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.

Drop Down Menu first item not selected

  1. All
    Member

    - What is the best way to make sure the user actually has selected one of the valid items not left the default item through validation?

    use case issue:

    using drop down menu
    ex. 1
    item1
    item2
    item3

    issue:
    1. some users leave the default item selected when it's not what they wanted
    2. form doesn't have a way to make sure that the user actually selected an item

    workaround kind of

    ex. 2
    Please select
    item1
    item2
    item3

    issue:
    1. form allows "Please select" as a valid entry

    Posted 11 years ago on Friday May 18, 2012 | Permalink
  2. David Peralty

    If you want to stop Please Select from being a valid entry, have a look at the following hook:
    http://www.gravityhelp.com/documentation/page/Gform_field_validation

    I will ping the developers about this to see if we can come up with a built-in solution in the future.

    Posted 11 years ago on Friday May 18, 2012 | Permalink
  3. All
    Member

    thanks.

    essentially the functionality should be.

    1. if the user has touched the field or not
    ---- if they haven't ERROR
    ---- if they have and the default value selected ERROR

    Posted 11 years ago on Friday May 18, 2012 | Permalink
  4. David Peralty

    Some people like setting the default options so that people don't have to enter data on a long form with multiple selections. So we would have to decide some sort of UI for controlling this effectively.

    Posted 11 years ago on Friday May 18, 2012 | Permalink
  5. All
    Member

    Built-in functionality or perhaps a true "developer eddition" will plugin support to allow any changes to work when you upgrade.

    "Some people like setting the default options so that people don't have to enter data on a long form with multiple selections. "
    Yes, unfortunately that doesn't provide accuracy if you truly require absolute validation of the data.

    suggestion would be a not allowed input option.

    Posted 11 years ago on Friday May 25, 2012 | Permalink
  6. All
    Member

    Until the developers provide a solution referencing http://www.gravityhelp.com/documentation/page/Gform_field_validation where in form_display.php would you insert the example code to make it work. This would help to assure that the code is placed correctly.

    any assistance would be appreciated.

    Posted 11 years ago on Sunday May 27, 2012 | Permalink
  7. David Peralty

    Yes, you could create an option in your drop down called "Select Below" then validate using the hook you pointed out creating an error if they leave it on "Select Below".

    You could not, however, determine if they have opened the field or not though using PHP. You could use some form of JavaScript validation, but you would have to write this yourself (JS is my weak point)

    Posted 11 years ago on Monday May 28, 2012 | Permalink
  8. All
    Member

    Any update on this request of integrating default values as not valid submission through the GUI.

    Posted 11 years ago on Thursday August 23, 2012 | Permalink
  9. I have the same problem... any news about it? Contact form 7 (free plugin), do it so simple...

    Posted 11 years ago on Thursday August 23, 2012 | Permalink
  10. You can create a drop down, with the first option to be: "Select Below" or "Please Select". Then enable values on the field, but leave a blank value for the "Select Below" option.

    Posted 11 years ago on Thursday August 23, 2012 | Permalink