CodeIgniter Forums

Full Version: form in form not working
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

El Forum

[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?

El Forum

[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.

El Forum

[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?

El Forum

[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.