Is there a way that I can remove the action attribute in CodeIgniter?
The code would normally be like this:
form_open_multipart(\'person/add\', $attribut
Sure you can but consider:
1) The action attribute has a meaning and a function, don't know why you want it out
2) You can always pass it an empty string :
<?php echo form_open('');?>
or <?php echo form_open_multiaction('');?>
gives:
<form action="" method="post">
In case you're really sure about this, just open up the form_helper.php
file, located in system/helpers/form_helper.php.
Pick lines 59 - 65 :
$action OR $action = $CI->config->site_url($CI->uri->uri_string());
$form = '<form action="'.$action.'"';
$form .= _attributes_to_string($attributes, TRUE);
$form .= '>';
and change line 60 to
$form = '<form ';
form_open_multiaction() just picks the form_open() and adds the enctype attribute, so you change form_open() and you're set.
It's up to you now, I still fail to see why an empty action won't suffice to your goals.