Welcome Guest, Not a member yet? Register   Sign In
form_submit
#1

[eluser]Josssi[/eluser]
Hi people,

isnt possible write someting like this below?

Code:
echo form_submit('submit', 'Zobraziť', array('class'=>'blue_button'));

I need to add class to my button because i want to give him other luck in css like for other buttons. Exist some way to write it without mortal HTML <div>?

Thanks
#2

[eluser]Samus[/eluser]
[quote author="Josssi" date="1333797596"]Hi people,

isnt possible write someting like this below?

Code:
echo form_submit('submit', 'Zobraziť', array('class'=>'blue_button'));

I need to add class to my button because i want to give him other luck in css like for other buttons. Exist some way to write it without mortal HTML <div>?

Thanks[/quote]

You either add the name & value in the first & second parameters respectfully.

Or you write everything in an array.

Code:
echo form_submit('submit', 'Zobraziť');

or

Code:
echo form_submit(array('name' => 'submit', 'value' => 'Zobraziť', 'class' => 'blue_button'));
#3

[eluser]Aken[/eluser]
Actually you can use a third parameter, it just needs to be a string instead of an array. Otherwise Samus' method works great, too.

Code:
echo form_submit('submit', 'Zobraziť', ' class="blue_button"');




Theme © iAndrew 2016 - Forum software by © MyBB