Hi
I would like to validate phone/fax numbers. Users must enter 8 digits or more.
Is that possible?
Hi
I would like to validate phone/fax numbers. Users must enter 8 digits or more.
Is that possible?
It is possible in 1.6 with the input mask feature that was introduced. 1.6 has not been released yet, but is at release candidate 5 now. If you have the opportunity, please install the 1.6RC5 on a test site and give it a trial run to see if the input masks will help you out.
http://www.gravityhelp.com/gravity-forms-v1-6-beta-1-released/
"Javascript Masks"
Any idea when the final version will be released?
Very soon is the best I can guess. A majority of the team is travelling this weekend, so I would not expect any news before Tuesday, and who knows how soon after that. RC5 is looking very good. You should test it out and let us know how it works for you.
Hi Chris,
I installed the 1.6RC5 (following your instructions in an other thread). Even though I managed to add an other entry in the input mask select list, it does nothing when typing in the concerned field. (the option is endeed saved).
The entry was set through functions.php:
add_filter("gform_input_masks", "add_mask");
function add_mask($masks){
$masks["Tel french"] = "99-99-99-99-99";
return $masks;
}
Can you tell me where to look to get this working?
Chris
Although the messages are saved, no error messages are firing up anymore, nore the validation message.
Maybe this last information will help understanding?
Chris
Can you share a link to your site where this is happening?
Does the field look like this on the front end?
http://minus.com/mMB0KjqAG
The SSN mask (___-__-____) prevented letters from being entered, but I left some numbers off (I think I submitted 5 numbers only) and there was no validation error. Is that similar to what you experienced?
Hi Chris,
unfortunately on the front end the filed appears empty with no SSN mask as you can see here ("Téléphone input field") http://www.peuples-solidaires.org/ce-que-vous-pouvez-faire/devenir-signataire-dev/
You have some JavaScript errors on the page which are preventing the jQuery that provides the input mask from loading. Screenshot: http://min.us/mDNkDQdo5
You should fix the first two errors, and I think they 3rd will go away, and the input mask will work.
Also, did you embed the form using the shortcode, or are you including it some other way? If you are using the function call to embed the form in your template, it's possible you need to enqueue the styles and scripts yourself. Directions on how to do that are here:
http://www.gravityhelp.com/documentation/page/Embedding_A_Form#Enqueue_Scripts_and_Styles
Actually, from looking at the source of the page, it looks like no Gravity Forms CSS or scripts are being included. How did you embed your form?
Hi Chris,
I embeded the form using the following shortcode [gravityform id="3" name="Devenir signataire" title="false" description="false" ajax="true"]
I fixed the java script problems and now the error messages are correctly shown.
Although the form is recorded when the sent button is clicked, the confirmation message doesn't show up.
Also and still, when using saving the form with the "input mask" I get the error jQuery("input_3_15").mask is not a function
You have JS errors because Gravity Forms scripts aren't being enqueued and output. This means the necessary JS is not present on the page.
Gravity Forms uses the WordPress enqueue function to output scripts, but it isn't present on your page.
If you are using the shortcode in a page or post this means there may be a problem with your theme or a plugin conflict issue.
The first thing to look at in this case is that your header.php has the wp_head() function call AND your footer.php has the wp_footer() function call.
If you are using the shortcode and these functions are present in your theme, then you may need to check for theme and plugin conflicts by following these directions:
IF you are displaying the form using the function call then it's not going to automatically enqueue the necessary scripts and CSS. You'd have to use our enqueue function to do so. You can find documentation on this here:
http://www.gravityhelp.com/documentation/page/Embedding_A_Form
Review the above, follow the instructions i've provided and let me know how it goes.
Hi, thanks for your "road map". I managed to solve the problem. Both wp_head() and wp_footer() were not activated and there was a javascritp error in a plugin which I fixed.
I noticed that the version 1.6 was released and installed it automatically.
Thanks again.
BR
Chris
Thanks for the update Chris. Glad you got that resolved.