I am having an issue with the percent sign keyed into a text field on my iForms causing the remainder of the field to disappear from the prompt in the HEO order. Has anyone else encountered this? What is the workaround? Thanks.
--
You received this message because you are subscribed to the Google Groups "HEO iForms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to heo-iforms+...@googlegroups.com.
To post to this group, send email to heo-i...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/heo-iforms/111b2fee-1cd2-41d2-b230-36dfcf40338a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
What's scary about this is that prompts after the prompt with the reserved character are also impacted. Thanks for the help!
This sounds like a great solution. Could there be any issues with downstream applications not displaying the URL encoded special characters properly? Thanks for the help!
--
You received this message because you are subscribed to the Google Groups "HEO iForms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
heo-iforms+...@googlegroups.com.
To post to this group, send email to
heo-i...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/heo-iforms/8fb3296e-f421-4b3b-b01d-627c746a3851%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
This sounds like a great solution. Could there be any issues with downstream applications not displaying the URL encoded special characters properly? Thanks for the help!
From: heo-i...@googlegroups.com [mailto:heo-i...@googlegroups.com] On Behalf Of ckittred
Sent: Wednesday, March 25, 2015 10:10 AM
To: heo-i...@googlegroups.com
Subject: Re: percent sign wiping out remainder of field input
I think that these characters don't work because they are not being correctly serialized during the form POST. To get them working all you need to do is convert them to URL encoded format - javascript can do this for you with the encodeURIComponent method. I call this method on form submission for all user-facing text fields, works great
On Tuesday, March 10, 2015 at 10:21:40 PM UTC-4, Scott Morris wrote:If you know your way around javascript, you can prevent the users from using the "forbidden characters." I've made much of my jQuery code freely available here https://github.com/scott-morris/jquery-iforms (the raw file can be found at https://raw.githubusercontent.com/scott-morris/jquery-iforms/master/src/jquery.iforms.js ).
If you take a look at the "maskInput" function starting around line 63, you'll see that the function checks for user keypresses and prevents certain key combinations from working (namely those that make the percent sign among other things) as well as pulling them out of pasted values. To implement it, you'd need to add this code to your page and, where you do your other "on page load" functionality, add a line to $("input:text").maskInput();
Hope that helps!
On Tuesday, March 10, 2015 at 4:19:03 PM UTC-4, SK wrote:I am having an issue with the percent sign keyed into a text field on my iForms causing the remainder of the field to disappear from the prompt in the HEO order. Has anyone else encountered this? What is the workaround? Thanks.
--
You received this message because you are subscribed to the Google Groups "HEO iForms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to heo-iforms+...@googlegroups.com.
To post to this group, send email to heo-...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/heo-iforms/8fb3296e-f421-4b3b-b01d-627c746a3851%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Yes I would like to know more about using the jQuery deferred object. Thanks!
To post to this group, send email to
heo-i...@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/heo-iforms/0357da5f-663f-4f57-bda6-71400bd07dc7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
var formPassesValidation = $.Deferred(); //this promise object resolves when the form has been submitted and there are no validation errorsfunction customValidation() {
var errorFlag = false;
var errorMessage='There are issues that need resolved:\n\n';
if ([javascript]) {
errorMessage += 'Blah blah\n';
errorFlag = true;
}
if (errorFlag==false) {
formPassesValidation.resolve();
} else {
window.event.returnValue=false;
alert(errorMessage);
}
}function fixSpecialChars() {
$.when(formPassesValidation).done( function() { //resolves when the form has been submitted and there are no validation errors
$('input:text').each( function(i,e) {
e.value = encodeURIComponent(e.value);
});
});
}$(document).ready(function() {
$('form').on('submit',function() { customValidation() });
fixSpecialChars();
});To view this discussion on the web visit https://groups.google.com/d/msgid/heo-iforms/0357da5f-663f-4f57-bda6-71400bd07dc7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
To view this discussion on the web visit https://groups.google.com/d/msgid/heo-iforms/069f450d-6d98-4c97-95d3-26413c0b0fe0%40googlegroups.com.To post to this group, send email to heo-i...@googlegroups.com.
Modifying the second block to “$('textarea').each(function(i,e)” works. Sorry Scott I could not get “$('input:text, textarea').each(function(i,e)” to handle the textarea. Thank you both for the help.
To view this discussion on the web visit https://groups.google.com/d/msgid/heo-iforms/CAE50V566HHDWyjRNanGtQtNcAW%2B4FHLidyzYWfpH0UTggSUeyA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.