[eluser]pendalpusher[/eluser]
I have two issues, that seem to be form validation issues, but I'm not sure how to work them in. let me explain each in some detail.
1. I have two checkboxes on the form One or Both of them can be checked, but it is required that at least one be checked.
right now I have them like this
Code:
//....more code
<?=form_checkbox('press[]','press_1');?>Machine 1
<br />
<?=form_checkbox('press[]','press_2';?>Machine 2
//... more code
how would i leverage the form validation class to check if one or both of these are checked?
the second problem is similar but involved a check box and a text field.
if the checkbox is set, then the text field is required.
Code:
//.... more code
<?=form_checkbox('other','other');?>Other (details required)
<br />
<?=form_input('other_details','Other Details');?>
//...more code
again .. how would I use the form validation class to check this?
I started writing a MY_Form_Validation class, but I don't know how to invoke it on the form fields once they are written.
Thanks in advance for any help.