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.

Add addition fields if a certain option is selected

  1. I have searched the FAQs, Documentations, etc., without finding something similar to the below:

    I am building a form for credit repair clients. It is a "Credit Profile Builder", where they can list of the derogatory items that need repaired.

    Possible items are Collection Accounts, Charge-Offs, Late Payments, etc. We need other information about these accounts, for example, the Date of Charge-Off, the Amount of Charge-Off, etc.

    I want the form to expand as they complete it, for example:

    It starts with one item from a drop down (perhaps is says "Select the first item below:").

    If they select anything (Charge-Off, for example), it asks for Date of Charge-Off, Amount of Charge-Off, Name of the creditor, etc.

    Then they can add another account.

    If they select another account (a Collection Account, for example), it will ask for more information, just like above, such as "When was this account turned over to collections?", "How much is the collection?", "Which collection agency is collection on this account?", etc.

    I can't seem to find an efficient way to accomplish this objective.

    Could you help get me in the right direction?

    Thank you!

    Posted 12 years ago on Tuesday June 5, 2012 | Permalink
  2. Looks like you might need a dose of conditional logic, see here:
    http://www.gravityhelp.com/documentation/page/Enable_Conditional_Logic

    Basically, you can show/hide fields based on other field options. Give it a try, let me know if you get stuck.

    Posted 12 years ago on Tuesday June 5, 2012 | Permalink
  3. I cannot believe how fast someone answered. Amazing.

    Yes, great idea... I will work on this.

    Thanks so much!

    Posted 12 years ago on Tuesday June 5, 2012 | Permalink
  4. What are the conditional logic operations? Is there a page in the documentation on this? I have a 'number' field set. Then, depending on the number input, I want additional fields to appear. So if they have the number 3, for example, inserted into the number box, would I use the following to show fields?:

    "Show" this field if "all" of the following match:
    "Number of Children" "is" "<2"

    Posted 12 years ago on Tuesday June 5, 2012 | Permalink
  5. On the field you want to show, you would apply the conditional logic - which is on the Advanced tab when you edit the field. So if you want that field to show if someone puts in a number less than 2 you can do that, if you want it to show if they put in a number greater than 2, you can show it. Does that help? Give it a try, you can always update the form and preview it using the preview link in the formbuilder tool.

    Posted 12 years ago on Tuesday June 5, 2012 | Permalink
  6. David Peralty

    You are correct on your assumption. We don't have much documentation on this as of yet, but for the most part, logical assumptions will be correct.

    Posted 12 years ago on Tuesday June 5, 2012 | Permalink
  7. Yes, I applied conditional logic in the advanced tab to the fields I want to show. Ideally, if they only put 1 in my quantity number field, then it only shows the default fields to collect data for the first attendee. If they put in 2, then I have assigned conditional logic so that if they enter any number greater than 1 (I have it as '>1' in the appropriate field) then they will see fields for additional entries. If they put in 3, I have used '>2'... and so on. In my preview, the optional form fields based on the conditional logic are hidden, but when I insert a number greater than 1, none of the additional entries are appearing. Is this supposed to work in the preview? I will post this so you can see the form and send you the link so you can see it on the back end of the site: http://www.cbcbulverde.com/?gf_page=preview&id=1

    Posted 12 years ago on Tuesday June 5, 2012 | Permalink
  8. We'd need an admin login to see the preview. Can you send me one to rob@rocketgenius.com so I can take a look at what you have going on? Please reference this post in your email.

    Posted 12 years ago on Tuesday June 5, 2012 | Permalink
  9. Rob, I just sent you an email along w/ one from WP w/ an admin role for you. Thanks for looking at this.

    Posted 12 years ago on Tuesday June 5, 2012 | Permalink
  10. Nathan, I see your issue, instead of choosing the "is", drop that down and choose greater than and then just put a numerical value in the input box to the right.

    Posted 12 years ago on Tuesday June 5, 2012 | Permalink
  11. Thank you guys for helping me out with this. The form is working beautifully, so far. Awesome.

    Posted 12 years ago on Tuesday June 5, 2012 | Permalink
  12. Hello,

    I have a good start here, but have a few questions:

    I have them select from a drop down (Add an account).

    If they select "Add an account", a hidden question is shown, for example, "what type of an account is this?" with the options being Collection, Charge-Off, etc.

    If they select any option, a hidden question is shown, for example, "when was this account turned over to collections?"

    ...and so on.

    Since the series of questions is the same, is there a way to duplicate the series of questions or do I have to build out the form with all of the questions?

    Thank you!

    Posted 12 years ago on Wednesday June 6, 2012 | Permalink
  13. You can duplicate existing fields, but you have to duplicate them one by one at the moment. There currently isn't a way to duplicate them in a group.

    Posted 12 years ago on Wednesday June 6, 2012 | Permalink