I'm new to Marketo and my form that has a drop down can be submitted without the drop down being selected by a user. We currently have "Select" as the default value, so I assume that is why it is allowing the submission, so is there a way around this?
Solved! Go to Solution.
@mrkcrne ,
ultimately, if you have no value in the 'select' option, Marketo will display an error anyway when someone moves through the field, or tries to submit the form.
To make that work, you need to get rid of the value in the red box.
If you placed your form (configured as you showed it in the screen shot of your drop down options) on a test landing page, this would happen natively, as you've got no entry for the stored value.
To prove this, I inspected the form elements and altered the select option for industry.
When I tried to submit the form I got this error
Talk to your dev team about WHY what they are doing is adding in the value="select" instead of leaving as value="", and could they please stop.
Cheers
Jo
Thanks, I have the filed marked as required and this is how the choices are set up. But it isn't working as I can submit this field without selecting a drop down value.
https://www.vicorpower.com/home/z-work-in-progress/get-updates
Both Role and Industry are a required field.
Hey Sanford, maybe this isn't the correct place for this, but I can assure you that this is the correct form. We are doing a lot with some js code in our CMS, we support 4 languages and we are using the language switcher on our site to make sure that the form is in the correct language. We also have a custom CSS to make our forms conform with our site. Not sure if you want to look at the custom js or if that is asking to much.
If you're using JS to dynamically change the options so the topmost option has different inner text and has a value, then in practice it's not the same form.
As you can see, its value is the string "Select", not the empty string:
I put that form's embed code, without your customizations, in a CodePen. You'll see the form cannot be submitted when the topmost option, with the display text "Select...", is selected:
https://cdpn.io/pen/debug/mdqRwKy/4465a9bceacc125ecc2fad54f5ca6901
Thanks for all the help, this is interesting as the "Role" looks like it is requited but the "Industry" is not. I just clicked the submit button and the red outline showed up around the "Role" field but not the "Industry" field. The industry field is also required.
Again, you can see that the option has a value: