Ever needed a checkbox or radio list on your form to display a default placeholder option? You might have tried simply ticking the ✓ icon next to the list option you want as select field default placeholder. Works, right? Problem solved. Alright, not so fast.
Struggling with forms being submitted with the default placeholder option still in your select fields or dropdowns?
Ticking the ✓ will set that list option as the select field default placeholder. The problem you probably discovered quickly after that is that your form can still be submitted with the default placeholder selected. That’s just about useless if you need an actual response to that field!
There’s a quick and easy solution to forms being submitted with the select field default placeholder!
Forms being submitted with your select field default placeholder still in place? You’re one step away from a really easy fix.
Adding a default placeholder to a dropdown, checkbox, or radio list is super easy. If you don’t know how, it’s demonstrated directly below. If you know how to set one already and just need to know how to keep the form from submitting with the select field default placeholder in place, skip one section down!
How to add a default placeholder to a dropdown, checkbox, or radio field
Add/choose your select field and click on it to open its settings window, and then:
- Click the blue circle/+ icon next to Options to add an additional list option.
- For the list option label, write something prompting the user to make a selection.
- In the right-hand column under the ✓ icon, tick the box next to this list option.
You now have a default placeholder for this select field. When the user views the form on your site, this option will be pre-selected for them:
How to keep your placeholder selection from being submitted
If this field contains pertinent information that you need, having the form submit with the placeholder is a pain. If the user doesn’t make a selection, that’s exactly what happens. Even if the field is marked as required!
To keep this from happening, you only need to make a single adjustment.
In the Value column, leave a blank for your placeholder, then set the field to required if it isn’t already.
With the field set to Required, any list option not containing a Value will not pass validation. In plain English, that means if a user doesn’t pick an actual option, the form won’t submit. Instead, it will prompt them to make a selection:
As an aside, these Values are also what will appear in submissions and email responses, rather than the Label. Set the rest of them so you’ll know what they are 🙂
Never have a form submitted with the placeholder selected again!
Following the technique above should resolve any issues you have with guests submitting your WordPress forms without a valid response chosen in your select fields!
This article was written largely because this is a question we see regularly in our support channel and blog comments. You’ll find this article’s comments below.
What questions do you have about using Ninja Forms?Never have a form submitted with the placeholder selected again!Click To Tweet