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.

Auto skip to next field and conditionally disabled/enabled submit-button

  1. I've already found the answer to my question regarding validating the contents of a field and there seems to be plenty of ways to go about this. I love the mask function! One question remains though: From what I can gather, the form will not be submitted until the entries match the predefined mask?

    My next question is if there's a function that auto skips to the next field when a field reaches it's max number of characters. (i.e. if there are multiple fields for phone number, i'd like the cursor/marker to skip to the next field). Is there such a function or can this be added by some custom tweaking?

    Last but not least I would like the submit-button to be deactivated once it's been hit, to prevent the form being sent multiple times (people these days are too impatient).

    Anyone who can help me out with these questions?

    Thanks in advance
    Axel

    Posted 12 years ago on Monday May 28, 2012 | Permalink
  2. David Peralty

    That is correct, a field is not correct until it matches the predefined mask. There also is a hook to do custom validation on fields.

    Your last two questions are not built-in, but they are JavaScript customizations that can be developed by yourself or a competent JS developer. You can also have a field be no-duplicates thus helping solve the double click on submit creating two copies of data.

    Posted 12 years ago on Monday May 28, 2012 | Permalink
  3. Thank you for your quick response!

    Do you add the no-duplicates to one of the fields in the form, or to the submit-button?

    Posted 12 years ago on Monday May 28, 2012 | Permalink
  4. David Peralty

    You can select fields that you want "no duplicates" in. For example, you can just set e-mail as no duplicates so that someone can only submit one entry per e-mail address, or you can have all fields as no duplicates making each field as a "must be unique" call. Each field is tested independently though. So it doesn't take other fields into consideration.

    Posted 12 years ago on Monday May 28, 2012 | Permalink
  5. Ok! Thanks!

    One more thing: when tweaking the form with JS, is GF built with hooks? Some of the scripts will probably have to be executed within the <form>-tags,.

    Posted 12 years ago on Monday May 28, 2012 | Permalink
  6. Nevermind, I think I've found what I need!

    Thank you for your help so far!

    Posted 12 years ago on Monday May 28, 2012 | Permalink

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