Single html Form With Multiple Submit Buttons |
[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'
[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'))
[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 ?????????????
[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 ?
[eluser]WanWizard[/eluser]
Without javascript, you can't. One form can only have one action.
[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">
[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">
[eluser]Unknown[/eluser]
I have taken it from http://wintekweb.blogspot.com/2012/05/ph...-home.html Try It
[eluser]Bill Hernandez[/eluser]
Code: <!-- block [8400], or [8600] both work correctly, [8500] does not. --> |
Welcome Guest, Not a member yet? Register Sign In |