Welcome Guest, Not a member yet? Register   Sign In
form_input() How do you style this?
#1

[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
#2

[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
#3

[eluser]Wonder Woman[/eluser]
For the form_input CSS issue, I would just add a class or an id and style it using those.
#4

[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
#5

[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');

echo form_input($property_type);
#6

[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.
#7

[eluser]Wonder Woman[/eluser]
Glad you got it sorted.




Theme © iAndrew 2016 - Forum software by © MyBB