Hi,
Before I start to use jquery for form validation, I wonder if I could user RequiredFields to check if a CheckboxField is selected .
The next code is not validating the CheckboxField :
function SubscriptionForm() {
$condition =FormPage::ConditionDetails();
$url = $condition->URLSegment;
$fields = new FieldSet(
new HiddenField("Subject", "Subject", $this->CF_Title),
new TextField("Name", "Naam"),
new CheckboxField("CheckThis","Ckeck this box")
);
$actions = new FieldSet(
new FormAction('SendSubscriptionForm', 'Send')
);
$validator = new RequiredFields('Name','CheckThis');
$form = new Form($this, "SubscriptionForm", $fields, $actions, $validator);
return $form;
}
Seems ok, but maybe i missed something.
Thanks in advance..