I have this simple form that is having some CSS issues when the field is invalid.
Check this out:
Simple Form with jQuery and Validate plugin
So all the fields are required. If you just hit the submit button the error fields get a nice yellow background to alert you (along with the invalid text).
The issue is the option buttons. The surrounding div of the radio buttons don’t get the yellow background. But, get this. Type anything but #’s in the “amountOther” field and the yellow highlight shows up. it’s baffling me. why won’t it highlight on the first try?
thoughts?
Thanks!
Move the
AmountOthertext box into its own<div class="field">The
divthat contains the radio buttons is not getting highlighted because that samedivcontains theAmountOthertext field (which is not required if the other radio button is not selected). You have two fields (AmountandAmountOther) in the samediv, one is required (Amount) and one is not (AmountOther), there for it is not highlighted.