Welcome Guest, Not a member yet? Register   Sign In
Applying a style sheet class to a Form

Hi all,

Still very new to all this, but loving it! Bit confused about applying style sheets to the form_open() command.

Say I want to end up with something like this in my page:

<form class="form-style">

How do I go about applying that class to the form_open() command?

I read somewhere else about adding on a style as an extra parameter to something, but for the life of me I can't remember - old age creeping in!

Thanks for any help,

Best regards


[eluser]TWP Marketing[/eluser]
From the User Guide:

Quote:Adding Attributes

Attributes can be added by passing an associative array to the second parameter, like this:

$attributes = array('class' => 'email', 'id' => 'myform');

echo form_open('email/send', $attributes);

The above example would create a form similar to this:
<form method="post" accept-charset="utf-8" action="http:/example.com/index.php/email/send"  class="email"  id="myform" />


RTM comes to mind. Thank you very much for this.

Best regards


Theme © iAndrew 2016 - Forum software by © MyBB