I have problem with Mootools formcheck
js when applying custom function
to Selectbox field
. Custom Function will be work fine with Text Field, but Selectbox is NOT.
My dummy code of Custom Function:
var customFunc = function customFuncF(el) {
el.errors.push('Custom function!!!');
return false;
};
And There are a simple form that I apply to a text field:
and
<input type="text" class="validate['%customFunc']" id="User_lastName" name="User[lastName]" >
-> It works fine with text field.
But when I apply custom function
to Selectbox field
, example as Office list
in my simple form, it's seems not work and always returns true
. My example code for Selectbox
<select id="User_officeId" class="validate['%customFunc']" name="User[officeId]" >
<option selected="selected" value="">-Select Office-</option>
<option value="1">Office A</option>
<option value="2">Office B</option>
</select>
How can I apply custom function
to Selectbox field
?
Thanks,
--
---
You received this message because you are subscribed to the Google Groups "MooTools Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mootools-user...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.