CodeIgniter Forums
form in form not working - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: form in form not working (/showthread.php?tid=9860)



form in form not working - El Forum - 07-10-2008

[eluser]Mitja[/eluser]
<?= form_open('happening/arrangements_scoop');?>

text...

<?= form_open('happening/arrangements_extra');?>

text...
<input type="submit" name="scoop" value="Scoop" />

<?= form_close();?>

text...
<input type="submit" name="extra" value="Extra" />

<?= form_close();?>

why inside form not working and i cannot use it, and the button Extra also not working. If i click on button Scoope the code of button Extra is executed.

How can i fix that?


form in form not working - El Forum - 07-10-2008

[eluser]Seppo[/eluser]
In html, you can not use a form inside another form... try changing your html so you can put one after the other, or use JS to emulate the behaviour you expect.


form in form not working - El Forum - 07-10-2008

[eluser]JasonS[/eluser]
What does the form need to do? From what I can see you have 2 submit buttons. Can't you give each button an individual name and process it at controller level?


form in form not working - El Forum - 07-10-2008

[eluser]Developer13[/eluser]
[quote author="JasonS" date="1215755576"]Can't you give each button an individual name and process it at controller level?[/quote]

Yes - and that's exactly what I would suggest.