Populate input field with controller |
[eluser]freshface[/eluser]
Hey I have a form witch validation from this example: http://ellislab.com/codeigniter/user-gui...ation.html But the value field is allready taken. Can i populate the input field with my controller and how? Thx in advance
[eluser]xadio[/eluser]
Are you meaning like a search box which contains the work "Search..." and upon clicking it clears, or are you referring to actual data in the field, like "Zip Code: 000000" which would be generated by an geoip lookup? The first should be handled by Javascript, but the second could possibly* be set through Code: if(!isset($_POST['zipcode'])) { *I don't have a test environment set up to test it, but that is how I would assume the Validation library works because $this->load->library('validation'); is loaded in the controller's method not constructor.
[eluser]freshface[/eluser]
Solved it like this: Code: if (count($_POST) == 0) |
Welcome Guest, Not a member yet? Register Sign In |