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.

Text entry for "other" option in drop down menu

  1. ckrauskopf


    I have a form with a drop down menu which asks users to specify the industry of their company. One of the options is "other". I would like users to be able to specify what industry is signified by "other" if they choose this option. For the time being I have accomplished this by adding an optional form field with a prompt that says "if other, please specify". I would like to know if it is possible to accomplish this with only one field, i.e. a drop down menu which provides a text entry box if "other" is selected.

    If it would help to see the form, it is here for time being:

    Thanks for the help.


    Posted 13 years ago on Friday November 5, 2010 | Permalink
  2. ckrauskopf

    An update to the above post. I just thought of trying out the conditional logic to display the other text box only if "other" were selected from the drop down menu, but when I made a field conditional the whole form stopped displaying. Is there something I need to do to set up conditional fields?

    Posted 13 years ago on Friday November 5, 2010 | Permalink
  3. Conditional logic uses Javascript to show and hide the form if it is present. If the form doesn't display at all then it could be one of the issues below.

    1) Your theme template is missing function called. Specifically the wp_head() function call in the header.php and/or the wp_footer() function call in the footer.php file. These are required for plugins to be able to insert code in the head and foot. Check your theme to make sure they are there.

    2) Your theme has a Javascript error. If a Javascript error exists on the page, the conditional logic can not execute. Use something like Firebug for FireFox to make sure you don't have any javascript errors present.

    3) A theme or plugin conflicts. Code in your theme or another plugin could be causing a conflict with the conditional logic javascript. You can test for a theme conflict by activating the default TwentyTen theme and see if conditional logic works. If it does, then something in your theme is causing the problem (could be #1 above). If it doesn't then it is a plugin conflict. You test for plugin conflicts by deactivating ALL other plugins and only activating Gravity Forms, if the form works fine then you would activate each of your other plugins one by one and test the form after each one until you determine which one is causing the issue.

    The form isn't displaying because something on your site is interfering with the conditional logic javascript.

    Posted 13 years ago on Friday November 5, 2010 | Permalink
  4. ckrauskopf

    After following your instructions I see that the conflict appears to be with Thesis Theme v1.8. The conditional logic works fine with the TwentyTen theme. It seems that there are a lot of people using Thesis with Gravity Forms, and I've seen some known issues listed regarding styling and other problems. Has anyone found a way to have conditional logic in their forms on a Thesis Theme site?

    Posted 13 years ago on Saturday November 6, 2010 | Permalink
  5. There haven't been any other reports of problems with the Thesis theme and conditional logic. I use a default install of Thesis 1.8 to test with all the time with no problems related to conditional logic.

    It's more likely that you've got a plugin conflict of some sort, or perhaps you're having a conflict with some custom scripting added to the theme.

    The only known issues with Thesis are purely presentational, just some poor default theme styles for forms.

    Posted 13 years ago on Saturday November 6, 2010 | Permalink
  6. bwp2004

    I would like to resurrect ckrauskopf's original question.

    If someone selects "other" in a drop down menu, I want them to be able to manually write in their own selection. I know how to create the text field and use conditional logic to make it appear if the person selects "other." Here is the kicker, though:

    Whether the person selects one of the predefined values or writes in a custom value in a conditional text field, I want the value to POST to the same column in the database. This helps with organization and also helps with secondarily posting that value to Salesforce. Whether it's a predefined value or a custom value, I need it to post to the same field in Salesforce.

    Does that make sense?

    Thanks in advance for your help.

    Posted 12 years ago on Thursday November 10, 2011 | Permalink
  7. bwp2004

    I have one other question that I think is related.

    How do I take a user entry in one part of the form and use it to populate a hidden field in another part of the form?

    I want to use a person's last name (which they input) to create an entry which is "last name + Family" to be automatically entered as their company name.

    Posted 12 years ago on Thursday November 10, 2011 | Permalink
  8. @bwp2004 You would have to use custom PHP to do this. You would use the gform_pre_submission hook and then update the value of the hidden field with the combined value of whatever fields you want to combine to create it's value. So you have to use hooks to do this when the form is submitted because that data doesn't exist until the form is submitted.

    Posted 12 years ago on Thursday November 10, 2011 | Permalink