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.

Likert misbehaving after submission when required field is not filled

  1. finddarkpoet
    Member

    Hi @kevin, thanks a lot for your tutorial of the likert scale forms, it's fantastic, I've tried and it's looking great. I set some of them as required fields, if I submit without those fields filled in, the likert forms will be messed up.

    Snapshot:
    http://d.pr/i/vnH3

    I found that it's fine on your blog, so I imported your exported form xml and tested it in the default TwentyEleven theme, I got the same strange result.

    I'm not sure if it's because the way I implement the script and css or something else.

    I included the js in header.php before </head>, and pasted the css at the end of style.css, uploaded the js file into the theme's js folder. Again, it works perfectly fine normally, the issue occurs only if I submit with required fields left out.

    Please advice, thanks again.

    Posted 12 years ago on Wednesday October 3, 2012 | Permalink
  2. Can you post a link to your form by chance?

    Posted 12 years ago on Wednesday October 3, 2012 | Permalink
  3. finddarkpoet
    Member

    Hi, here's the link. http://singaporevisa.co/

    Posted 12 years ago on Thursday October 4, 2012 | Permalink
  4. Hmm interesting, seems as though on submit on yours - this bit of code disappears:

    <div class="likert-label">
    <label for="choice_8_0">Strongly Agree</label>
    </div>

    Each label is getting axed on submit. I'm not exactly sure why that's happening, but perhaps you could try to enable AJAX on the form shortcode.

    Posted 12 years ago on Thursday October 4, 2012 | Permalink
  5. finddarkpoet
    Member

    Hi Rob, thanks for the effort.

    AJAX has always been enabled in the shortcode, and I have tried this test on different wordpress installs, with different themes including wordpress default themes, the result is the same.

    Now I wonder why it's fine on your blog and some others' sites I've seen.

    Posted 12 years ago on Friday October 5, 2012 | Permalink
  6. finddarkpoet
    Member

    I noticed that on the blog, Kevin stated,

    "at the time I put this together originally, the Ajax form submission hadn't been added to Gravity Forms, so the jQuery portion of this tutorial hasn't been updated to work with Ajax-submitted forms. "

    So I disabled AJAX in the shortcode, the problem disappeared.

    It'd be nice to have it working with AJAX though.

    Posted 12 years ago on Friday October 5, 2012 | Permalink
  7. Ah ha! There could be a solution for you using this jQuery hook to let the JS fire again on validation errors:

    http://www.gravityhelp.com/documentation/page/Gform_post_render

    Posted 12 years ago on Friday October 5, 2012 | Permalink
  8. finddarkpoet
    Member

    Hi Rob,

    Thanks for the tip. I'm no where near a programmer, all failed after a few attempts.

    I'm not sure which part of the qtip js should be included as " // code to trigger on AJAX form render".

    Posted 12 years ago on Monday October 8, 2012 | Permalink