[eluser]Gyorgy Fekete[/eluser]
I have a problem. I'm submitting a form with javascript. I set the form's action and submit the form.
The problem is on the back-end side. The controller is loaded, but the $this->input->post is not loaded with the form elements.
I did a var_dump on $_POST and it was there.
I think it is a bug, but I'm not sure. Here's my html and javascript (jQuery)
HTML
Code:
<form action="#" method="post" enctype="multipart/form-data" name="frmSample" id="frmSample">
<input type="text" id="sample" name="sample" value="" />
<a href="#" id="form_link">Test submit link</a>
</form>
[removed]
Code:
var url = "http://test.dev/form-test"
$('#form_link').click(function(){
$('#frmSample').attr('action',url).submit();
});
I check for $this->input->post('sample') which is not loaded.
I check for $_POST['sample'] which works fine.