Single html Form With Multiple Submit Buttons - 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: Single html Form With Multiple Submit Buttons (/showthread.php?tid=36676) Pages:
1
2
|
Single html Form With Multiple Submit Buttons - El Forum - 12-10-2010 [eluser]mo2men[/eluser] hey i wont two Submit Buttons in one page example i have textarea and i want preview Before submit it in database 1 submit and go to create.php 2 preview and go to preview.php how i can do this in ci like in Forum 'preview post' 'submit post' Single html Form With Multiple Submit Buttons - El Forum - 12-10-2010 [eluser]cahva[/eluser] Process the form in same controller, just make actions based on what submit button was clicked: Code: if ($this->input->post('preview')) Single html Form With Multiple Submit Buttons - El Forum - 12-11-2010 [eluser]mo2men[/eluser] hi thanks but i want action go to Other Controller or Other function no same Controller new Controller or new function can i do that ????????????? Single html Form With Multiple Submit Buttons - El Forum - 12-11-2010 [eluser]Atharva[/eluser] I guess you need to use JS then. This will help you. Single html Form With Multiple Submit Buttons - El Forum - 12-11-2010 [eluser]Twisted1919[/eluser] [quote author="mo2men" date="1292081801"] but i want action go to Other Controller or Other function no same Controller new Controller or new function [/quote] WHY ? Single html Form With Multiple Submit Buttons - El Forum - 12-11-2010 [eluser]WanWizard[/eluser] Without javascript, you can't. One form can only have one action. Single html Form With Multiple Submit Buttons - El Forum - 12-12-2010 [eluser]umefarooq[/eluser] you can't use multiple buttons to submit form only one button can work at one time but you can have multiple submit button on one page for one form with same name but different value for example Code: <form action="welcome/action"> Single html Form With Multiple Submit Buttons - El Forum - 12-12-2010 [eluser]umefarooq[/eluser] you can't use multiple buttons to submit form only one button can work at one time but you can have multiple submit button on one page for one form with same name but different value for example Code: <form action="welcome/action"> Single html Form With Multiple Submit Buttons - El Forum - 08-04-2012 [eluser]Unknown[/eluser] I have taken it from http://wintekweb.blogspot.com/2012/05/php-scripts-home.html Try It Single html Form With Multiple Submit Buttons - El Forum - 08-08-2014 [eluser]Bill Hernandez[/eluser] Code: <!-- block [8400], or [8600] both work correctly, [8500] does not. --> |