![]() |
form_input() How do you style this? - 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_input() How do you style this? (/showthread.php?tid=33035) |
form_input() How do you style this? - El Forum - 08-13-2010 [eluser]tomclowes[/eluser] How do you style a form input output using the form_input() function? I have a class defined in my CSS file to style the inputs but everything I have tried has not worked. Thanks form_input() How do you style this? - El Forum - 08-13-2010 [eluser]tomclowes[/eluser] I'd like to add another question. What is the correct way of utilizing the form_validation helper and setting up a 2 step form with validation. Obviously i do not expect a full detailed explanation - rather i am looking for an idea of the setup in terms of what view files i need etc. Thanks form_input() How do you style this? - El Forum - 08-13-2010 [eluser]Wonder Woman[/eluser] For the form_input CSS issue, I would just add a class or an id and style it using those. form_input() How do you style this? - El Forum - 08-13-2010 [eluser]tomclowes[/eluser] Thanks ... but I have tried that. I have the class defined in my css. My question is essentially how do i get form_input() to output class="myclass"? Thanks form_input() How do you style this? - El Forum - 08-13-2010 [eluser]Wonder Woman[/eluser] Set up your attributes and then echo them out, like this: Code: $property_type = array('class' => 'property_type', 'id' => 'property_type', 'name' => 'property_type'); form_input() How do you style this? - El Forum - 08-13-2010 [eluser]tomclowes[/eluser] Thank you. It seems that by having an id and a class, I was overwriting the class.. well.. i dont know but either way it is working now. form_input() How do you style this? - El Forum - 08-13-2010 [eluser]Wonder Woman[/eluser] Glad you got it sorted. |