Validating a Form - How to set values on Dropdown Boxes? |
[eluser]Sinclair[/eluser]
Hi, I'am validating a form and I need to set_value on a <select>. I'am able to set the value, but I need also to show the text that is different from the value set. The code is: Code: <p> Wich is the best option to show the value selected on "echo $rowgeneros->n_genero;" Best Regards,
[eluser]pistolPete[/eluser]
Have a look at the form helper's method set_select(): http://ellislab.com/codeigniter/user-gui...elper.html
[eluser]Sinclair[/eluser]
I have another doubt... It is possible to have Callbacks with more thab 1 parameter? The problem is that I have 3 select boxes for input the date of birth, and I need to validade if the user don't input 31 of february, for example. I have userd the checkdate function, something like this: Code: function veracidade_check($vMES, $vDIA, $vANO){ It is possible to use callback function with more than 1 parameter? If not, how can I validate the inputs of 3 select boxes? Best Regards,
[eluser]pistolPete[/eluser]
How about that: Code: function your_callback()
[eluser]Sinclair[/eluser]
Great! It is working now. I have used the checkdate function. For example if I input 29 February of 1982 give me false. Code: $valor = checkdate($this->input->post('month'), |
Welcome Guest, Not a member yet? Register Sign In |