Validating Form Radio Buttons Magento

When creating use input forms in Magento it’s important to do as much validation on the client side as possible to make the user experience as smooth as possible.

When validating that one of a group of radio buttons is selected all you should need to do is add the class “validate-one-required-by-name” to one or more of your radio buttons. The message “Please select one of the options.” will appear under every radio button that has the class on it if one of them is not selected, so use it strategically.


Tags: htmlphpmagentovalidationrequired