Welcome Guest, Not a member yet? Register   Sign In
form_open, form_submit, bug [SOLVED]
#1

[eluser]Unknown[/eluser]
Hi,

Why is form tag not closed in core when form_open($action) is used.
Because I ran into bug where there was a login form in my header file of a page.
So when there was another signup form in another controller which when submitted had to call a function in login controller. It didn't get called instead it was calling the action of previous form.

I guess it was because of not closing form tag, another new form tag action had no effect since there was upper form.

Structure was like <form action="login/validate">........<form action="login/accept"> and no closing tag so action of first form was in effect even if 2nd form is submitted.

I solved this by appending a close tag </form> in form_submit('$data','$value') function return statement in form_helper.php.

Let me know.Thanks.
#2

[eluser]InsiteFX[/eluser]
CodeIgniter form_helper:
Code:
<?php echo form_close();?>
// or
</form>

You must always close forms at the end.

InsiteFX
#3

[eluser]Unknown[/eluser]
Ahh Thanks!!




Theme © iAndrew 2016 - Forum software by © MyBB