• Resolved art27

    (@art27)


    Is there a way to make a dropdown box appear empty by default? (No text)
    I don’t want any text in the box until somebody actually clicks on the selector and selects something. As it is at the moment, somebody can fill out all of the other fields and skip this field and the form will still send. Since the box is already pre filled with the first thing on the list which may not actually apply to the customer I may not receive the correct information.

    I tried adding an empty first “choice” which actually did work and it solved the problem but when I did a W3C Markup check it gave me an error because I had an empty field.

    What can I do to solve this problem? If you look at the other pages on my website you will see that my old contact forms also have a dropdown menu that is blank by default.

    I would also like to know if it is possible to make the dropdown fields look like the other fields when I view the form on a mobile. Is it possible to remove the gradient shadow?

    Thanks very much,

    Alan

    The page I need help with: [log in to see the link]

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Support Ethan Choi

    (@ethanchoi)

    Hi @art27,

    To add an empty first choice for the dropdown field, you can add a placeholder text. To do this, go to the form builder and click on the field. In the Advanced Options go to the Placeholder Text field to add your preferred text.

    Currently the dropdown fields take on the styles generated by the specific operating system you’re using when viewing the form, and we don’t have an easy way to remove the browser styles of the dropdown field. If you’re curious, you can find some extra detail about dropdown display/styling in this article.

    If you’ve any other questions please let us know.

    Thanks!

    Thread Starter art27

    (@art27)

    Hi Ethan

    So is there no way of just leaving the box totally blank like I have on my existing forms? Otherwise am I able to target the font color of the placeholder and make it white?

    Thanks very much,

    Alan

    Plugin Support Ethan Choi

    (@ethanchoi)

    Hi @art27,

    In the Placeholder Text field, you can use whitespace (you can add this with the ‘space’ key on your keyboard) to create a blank Dropdown field.

    Hope this help! 🙂

    Thread Starter art27

    (@art27)

    Hi Ethan

    Yes thats just what I was after.

    Thanks for that

    Alan

    • This reply was modified 4 years, 7 months ago by art27.
    Thread Starter art27

    (@art27)

    Just one small problem ….

    I just checked my page markup on

    https://validator.w3.org/

    and it throws up an error because the placeholder error is empty. This is odd because I never got an error on any other forms when the field was empty like this.

    The error says

    Error: Element option without attribute label must not be empty.

    From line 13, column 4960; to line 13, column 4968

    selected’></option><optio

    and when I view the source it is referring to this

    <option value="" class="placeholder" disabled selected='selected'></option>

    Plugin Support Ethan Choi

    (@ethanchoi)

    Hi @art27,

    Unfortunately we don’t have other options for having a blank option in the Dropdown field in this case.

    If you’d like to fix the error, you can add text in the Placeholder Text field. For example, you could provide instructions to the user, such as “Select an option”. If the user does not make a selection in the field, this text will not be included in the form submission.

    Hope this helps!

    Is there a way to remove the disabled parameter in the placeholder option? Right now, if a user selects from the drop down menu, the user can’t change their mind and unselect something because you can’t choose the placeholder option since it’s being disabled… I hope that makes sense, if not, let me know and I can try to clarify…

    Plugin Support Ethan Choi

    (@ethanchoi)

    Hi @gene158,

    Currently we don’t have the feature to remove the disabled parameter in the placeholder option. I’ve made a note of the feature request and we’ll keep it on our radar as we plan out our roadmap for the future.

    In the meantime, a possible workaround might be to add an additional choice to the Dropdown field that acts as a placeholder.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Dropdown – First line blank’ is closed to new replies.