Sep 08, 2010, 8:21 PM
[CLOSED] [0.8.2] CheckBox and Validator
Hi!
I have form with 2 check boxes:
a piece of code:
I have form with 2 check boxes:
<ext:FormLayout ID="FormLayout4" runat="server" LabelAlign="Left" LabelWidth="160">
<ext:Anchor Horizontal="92%">
<ext:MultiField ID="MultiField2" runat="server" FieldLabel="Wybierz operację">
<Fields>
<ext:Checkbox ID="checkBoxWydrukuj" runat="server" BoxLabel="Wydrukuj" Checked="true"
Validator="validateWydrukWysylka" InvalidText="One of checkboxes has to be checked!." />
<ext:Checkbox ID="checkBoxWyslij" runat="server" BoxLabel="Wyślij" Checked="true"
Validator="validateWydrukWysylka" InvalidText="One of checkboxes has to be checked!." />
</Fields>
</ext:MultiField>
</ext:Anchor>
</ext:FormLayout>
</Body>
</ext:Panel>
my validator content: var validateWydrukWysylka = function() {
alert('validator called');
return checkBoxWydrukuj.getValue() || checkBoxWyslij.getValue();
}
but validator code never is called - and form is valid even if 2 checkboxes are blank....a piece of code:
alert(#{checkBoxWydrukuj}.isValid()); var valid= #{FormPanel1}.getForm().isValid();
always return true....
Last edited by Daniil; Sep 10, 2010 at 11:22 AM.
Reason: [CLOSED]