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.

Hidden can't be added/removed with conditional logic - workaround?

  1. Hi, I'm trying to build a competition form. It has 10 dropdowns with 3 possible answers in each. If all 10 questions are correct, I want to use Conditional Logic to include a hidden fields with 'correct' as the value. This will allow my client to easily see you the correct entrants are.

    Hidden fields don't have cond logic, so can anyone think of another way to do this?

    Thanks!
    Ben

    Posted 8 years ago on Tuesday September 27, 2011 | Permalink
  2. The easiest way to handle this is going to be adding a hidden field to your form and then writing custom code that populates that hidden field AFTER the form is submitted (not before).

    You could use the gform_pre_submission hook to write custom code that checks the answers of the drop downs and determine if things are correct or not. If they are, then populate the value of the hidden field.

    The gform_pre_submission hook is documented here:

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

    Posted 8 years ago on Tuesday September 27, 2011 | Permalink
  3. Brilliant... I wasn't thinking nearly 'custom' enough, I forgot about all the hook and fun bits of GF. Cheers!

    Posted 8 years ago on Wednesday September 28, 2011 | Permalink

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