Forum
Add a selected attribute to a Perch select
Hi,
Is there any way to add a selected attribute to an option within a Perch <select>?
I've found this post (https://forum.grabaperch.com/forum/07-14-2016-option-disabledselected-in-select-input) with an option to add a disabled attribute, but I can't find anything about a selected attribute.
Is this possible?
Thanks for any help.
I think you can achieve this using the
value
attribute:Technically the first option is selected as long as it has a value
Often I do the following and give the first option no value then make the field required so if someone does not select an option the form will not validate