Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Codeigniter form_open specify id

How can I write the form ID in the form_open function in CodeIgniter? (I need to use the ID for the CSS). For example, this is simple HTML:

<form method="post" action="" id="my_form">

I am trying the following code, but it does not work:

<?php echo form_open('my_form'); ?>

Thanks.

like image 866
Roman Avatar asked Jun 06 '11 09:06

Roman


Video Answer


1 Answers

https://codeigniter.com/user_guide/helpers/form_helper.html

$attributes = array('id' => 'myform');
echo form_open('email/send', $attributes);
like image 96
Otto Avatar answered Oct 07 '22 09:10

Otto