I've never been able to get the required parameter to work with a select input. Any ideas why?


Then the input code as follows:

<select id="countries" name="country[]"  required>
<option value="">Please select</option>
  • Why have you got an array for the country value if this is an address? I'm fairly certain Freeform can't handle arrays. Does name="country" work? – Peter Lewis Dec 15 '15 at 16:40
  • I think Freeform does handle arrays. But the array wasn't needed as you state, and this caused the validation to fail. – Andrew Dec 18 '15 at 9:06

Use the "required=" parameter. https://solspace.com/docs/freeform/form/#required

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.