PLEASE NOTE: These forums are no longer utilized and are provided as an archive for informational purposes only. All support issues will be handled via email using our support ticket system. For more detailed information on this change, please see this blog post.

Minimum Characters

  1. Hi

    I would like to validate phone/fax numbers. Users must enter 8 digits or more.
    Is that possible?

    Posted 8 years ago on Thursday October 20, 2011 | Permalink
  2. 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"

    Posted 8 years ago on Friday October 21, 2011 | Permalink
  3. Any idea when the final version will be released?

    Posted 8 years ago on Friday October 21, 2011 | Permalink
  4. 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.

    Posted 8 years ago on Friday October 21, 2011 | Permalink
  5. netagence
    Member

    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

    Posted 8 years ago on Thursday October 27, 2011 | Permalink
  6. netagence
    Member

    Although the messages are saved, no error messages are firing up anymore, nore the validation message.
    Maybe this last information will help understanding?

    Chris

    Posted 8 years ago on Thursday October 27, 2011 | Permalink
  7. 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?

    Posted 8 years ago on Friday October 28, 2011 | Permalink
  8. netagence
    Member

    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/

    Posted 8 years ago on Friday October 28, 2011 | Permalink
  9. 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

    Posted 8 years ago on Friday October 28, 2011 | Permalink
  10. 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?

    Posted 8 years ago on Friday October 28, 2011 | Permalink
  11. netagence
    Member

    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

    Posted 8 years ago on Monday October 31, 2011 | Permalink
  12. 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:

    http://rkt.gs/testing

    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.

    Posted 8 years ago on Monday October 31, 2011 | Permalink
  13. netagence
    Member

    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

    Posted 8 years ago on Friday November 4, 2011 | Permalink
  14. Thanks for the update Chris. Glad you got that resolved.

    Posted 8 years ago on Friday November 4, 2011 | Permalink

This topic has been resolved and has been closed to new replies.