javascript - Validate for a button click/selected in Magento using the built-in validation -
i know magento validation javascript library pretty powerful, trying make magento recognise 3 buttons , have user forced select 1 before can proceed, possible using current javascript library in magento.
this isn't problem in case rather input buttons using standard button (probably not best way approach tbh)
<li class="fields"> <div class="field"> <button class="button organisation_type" value="1" type="button"><span><span><?php echo $this->__('org a') ?></span></span></button> <button class="button organisation_type" value="2" type="button"><span><span><?php echo $this->__('org b') ?></span></span></button> <button class="button organisation_type" value="3" type="button"><span><span><?php echo $this->__('org c') ?></span></span></button> </div> </li>
is possible using built in library uses css classes have request user select 1 button 3 above?
is possible use radio-button instead of buttons? if answer yes - can add 3 radio buttons (for 3 organisations), give them same name user can select 1 value, , add them class "required-entry".
Comments
Post a Comment