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.

How to create a field based on data from another field?

  1. So i want to make a field that looks at a users answer and creates inputs.

    Scenario : I ask someone how much their home is worth in the first field (drop down). Then in the second field I generate options for them to choose from based on their home value.

    Example: Use says their home is worth 500,000 in the first field. The second field has a list. each option displays 500,000 times X. X being something like 1%, 2%, 3%, 4%, etc. So if the user select the first option it would read to them as "$5,000"

    This form does exactly what I'm talking about.
    https://www.lowermybills.com/lending/home-refinance/app/index.loan?trafficQualifierId=1&sourceId=&visitorId=1182204966&verticalVisitorId=1687203707&inquiryId=280415148

    This is the basic reason why I bought gravity form.

    Posted 13 years ago on Monday February 7, 2011 | Permalink
  2. It has been requested before:
    http://forum.gravityhelp.com/topic/dropdown-selection-based-on-previous-form-input#post-13955

    But I don't think I've seen a solution posted.

    Posted 13 years ago on Monday February 7, 2011 | Permalink
  3. Gravity Forms cannot dynamically create fields on the fly based on user selections. All fields have to already exist on the form. You would have to create the fields and then use conditional logic to show/hide the fields that should be displayed based on user selections.

    Posted 13 years ago on Monday February 7, 2011 | Permalink
  4. Well the field already exists, it's the data displayed. So i would input something like Variable times X%. So if i had 3 choices it would 1%, 2%, 3%. If someone selected $1,000 dollars in the first field them the options would read $10, $20, $30.

    The code shouldn't be that difficult. I remember writing a cash register program back in high school that did the same thing.

    Posted 13 years ago on Monday February 7, 2011 | Permalink
  5. I understand what you are describing, it's not currently a supported feature. I also know it's not a feature of any of the other WordPress forms plugins and don't think it's a feature in any of the standard Forms solutions out there. It's not typical to find this kind of functionality in a standard form application. It's more specialized functionality that is typically found in more custom applications.

    Posted 13 years ago on Monday February 7, 2011 | Permalink
  6. paulamaas
    Member

    Does Gravity doesn't support drop-down options within the fields of the forms we create?

    We're actually looking to have users not just enter data into blank fields, but have some fields with preset options, so users could:
    > select a field,
    > see options relating to that field (drop down menu, or link to a new table)(second tier)
    > select one of these options - for most fields 2 tiers is enough
    > for some fields user see a third tier of options relating to their second-tier option
    (again, a drop down menu, or link to a new different table)

    In other words, does your software allow multi-level forms to go with a multi-level db?

    Posted 13 years ago on Thursday February 10, 2011 | Permalink
  7. I would have to see an example of what you are talking about. Your description is a bit confusing and I can't answer it based on what you provided. Gravity Forms has drop downs. It also lets you show/hide fields based on a drop down value. It also lets you set default values on fields. What it doesn't do is dynamic drop down population based on prior drop down selection. It can only show/hide another drop down which would have to already exist on the form. So you would have to add all your drop downs and then show/hide them using conditional logic.

    Posted 13 years ago on Thursday February 10, 2011 | Permalink
  8. paulamaas
    Member

    Thanks, Carl,

    I think we're getting close, and Gravity has been the one plug-in most people recommend for including drop-down menus in forms. But another tier?
    Here's a trivial example:

    What is your favorite color?
    first tier: drop-down menu offers choices of blue; red; green; yellow...
    user selects red, second drop down menu offers crimson; fire; cherry; brick...

    All of these colors would exist on our database.

    Also, we would like to offer the user the opportunity to write in their own hue at the second and third tier (blanks for user input that is then included as an option for the next users)

    Can Gravity offer this, if not, what would be needed to adapt it to do so?

    Thank you!

    Posted 13 years ago on Thursday February 10, 2011 | Permalink
  9. This is possible, however it's not built in functionality. You would have to use available API hooks to tell Gravity Forms to do this. It probably wouldn't be overly complex from a customization standpoint but you would have to be familiar with Gravity Forms customization and how to use hooks in order to implement it. I can recommend a WordPress developer with Gravity Forms customization experience if you wanted to do this.

    Posted 13 years ago on Thursday February 10, 2011 | Permalink
  10. paulamaas
    Member

    please do let me know a few people who can bid on this customization, thank you carl.
    paula

    Posted 13 years ago on Saturday February 12, 2011 | Permalink
  11. How about tricking the system.

    In my case i want categories (post type form) to be changed dynamically based on previous selection. so i though if we can create two category dropdowns and select the list of categories to show in each dropdown and accordingly when the user selects the previous checkbox i will show or hide the specific category dropdown

    Carl - What do you say, What are the cons of this approach if any. And i am talking in terms of technicalities. Will this be an accepted solution and will it work with your forms ?

    Posted 12 years ago on Friday March 23, 2012 | Permalink

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