![]() |
Form problem with dropdown - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: Form problem with dropdown (/showthread.php?tid=60795) |
Form problem with dropdown - El Forum - 06-30-2014 [eluser]Unknown[/eluser] Hi all, I'm using tank_auth and i'm updating the files to add some extra fields. Everything works fine except a dropdown filled with data returned form a sql query. I configured the dropdown in the register form. In the view I configure the array options in top of file: Code: $grupo = array( then populate the dropdown: Code: <div class="control-group"> I assign the form_validation in the controller: Code: $this->form_validation->set_rules('grupo', 'Grupo', 'trim|required|xss_clean'); Code: $data = $this->tank_auth->create_user( In the library I add the new column: Code: $data = array( In the model simply passed the $data with all arguments included the $grupo variable. The array with fill the dropdown contains next data: Code: Array ( [cliente1] => cliente1 [cliente2] => cliente2 [cliente3] => cliente3 ) No errors returned in the submit but the field is empty, I notice that no data are submited with the dropdown. What's wrong? May be are other way? Thanks a lot! Form problem with dropdown - El Forum - 07-01-2014 [eluser]Unknown[/eluser] Solved!! just a simple problem with the argument order. :roll: |