Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

adding attributes to form_open_multipart

Tags:

codeigniter

I was wondering how could we add attributes to file_upload in codeigniter

right now I am using form_open_multipart('controller');

but I want to add an id attribute to it.

Any help appreciated thanks!

like image 794
koool Avatar asked Jun 23 '11 01:06

koool


1 Answers

From the User Guide:

form_open_multipart()

This function is absolutely identical to the form_open() tag above except that it adds a multipart attribute, which is necessary if you would like to use the form to upload files with.

So, you would use it in the same way you use form_open(). Example:

form_open_multipart('controller', 'id="my_id"');

Or:

form_open_multipart('controller', array('id' => 'my_id'));
like image 85
Wesley Murch Avatar answered Oct 10 '22 05:10

Wesley Murch