Welcome Guest, Not a member yet? Register   Sign In
Form Validation depending on another field
#1

[eluser]theshiftexchange[/eluser]
Hi guys,

I know I've seen this answer before when browsing the forums - but I've search all day and I cant find it. How do I do a callback function to check another field?


i.e.
Field A
Field B

$this->form_validation->set_rules('fieldb','FieldB','callback_field_a_check');


Then in the callback, apply a rule to Field B, depending on what is in Field A?

I.e. Field B is ONLY "RequireD" if Field A is used




Theme © iAndrew 2016 - Forum software by © MyBB