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.

Product Drop-down First Choice Blank

  1. I would like to have a Product Drop Down field where the first field is not the first product, but rather an empty field or a "Select a Product...." message. I first did this manually by entering a dummy field at the top of the but because of certain conditional logic needs that path was unworkable. Right now when I have a list of Products in a drop down it automatically default to the first choice.

    What I'm looking for is some sort of "Preselect first field?" option to turn on/off. Any thoughts on this? Thanks!

    Posted 9 years ago on Tuesday March 6, 2012 | Permalink
  2. As for defaulting to one particular choice, there is a radio check box to the left of each choice field in the back end.

    Are you using strictly Gravity Forms or with a 3rd party plugin (ie...WooCommerce, Cart66, etc...)?

    I ask because I'm using WooCommerce and had to set the base price to $0 on my Gravity Forms, so all my dropdowns are for my Quantity and Options (ie...variables with additional costs) not my Product.

    Posted 9 years ago on Tuesday March 6, 2012 | Permalink
  3. Thanks for the reply. I want the default choice to be blank. Can I do this without manually entering a blank field? I'm using this as GF standalone.

    Posted 9 years ago on Tuesday March 6, 2012 | Permalink
  4. Haven't attempted that yet.

    I have placed a "—" in the first slot to emphasis that is an option

    Not sure if that helps.

    Have you opened a support ticket? I've found the GF team to be very helpful.

    Posted 9 years ago on Wednesday March 7, 2012 | Permalink
  5. I realized why having a manual default blank field is problematic: This is a required field, so if I enter in a blank field, this can satisfy the field's choice requirement and let the user continue. What I need is a blank state or a no-choice state, or a way to invalidate a field for meeting 'required' criteria who's default value is a default dummy field, ex: "Select.."

    I was hoping support would be by to answer this question, but I will send a ticket in to let them know. Thanks!

    Posted 9 years ago on Wednesday March 7, 2012 | Permalink
  6. Here is some reading on this.. which essentially advises that you need to invalidate any default value:

    http://ux.stackexchange.com/questions/4078/what-should-be-the-default-option-of-a-required-dropdown-list
    http://www.html-form-guide.com/php-form/php-form-select.html

    Posted 9 years ago on Wednesday March 7, 2012 | Permalink
  7. The only way to do what you describe is to make the first choice in your drop down field either blank, or say "Select A Product" and then enable values and leave both it's value empty as well as the price empty (empty is not the same as $0.00 in the price).

    With the value empty this means the field will not validate as required if you set it as required and with the price empty it will not be able to be saved a real product selection (if the field was not required).

    That is the only way to accomplish what you are trying to do using built in features and is the standard way to implement a drop down placeholder.

    Beyond that if this for some reason doesn't work for what you are trying to do you would either need to be creative with how you use the available features and functionality, or use available hooks and write your own customization using custom PHP.

    I did not see an explanation as to why this route doesn't work for you other than that it involves conditional logic. If you can explain what exactly it is you are trying to accomplish I may be able to suggest alternatives.

    Posted 9 years ago on Wednesday March 7, 2012 | Permalink
  8. Thanks Carl, that's the trick I needed. I'll leave the value empty!

    Posted 9 years ago on Wednesday March 7, 2012 | Permalink

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