I using Codelginiter PHP MVC framework to develop a web application, i am trying to use form_open() instead of <form></form>, what i am trying to do is add class="navbar-form navbar-left" role="search" to it and seems it doesn't not work.
here is the code to make a form
<?php 
echo 
form_open('social_controller/search_me');
?>
                I'll quote a section from the documentation.
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); 
It seems you have not tried adding an associative array as the second parameter? Try this:
echo form_open('social_controller/search_me', array(
    'class' => 'navbar-form navbar-left', 
    'role' => 'search'
));
                        form_open('social_controller/search_me','class="Your Class" role="Your Role" attribute1="value1" attribute2="value2" ');
                        If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With