Hello,
I try to split-up a single form in several pages to get a wizard-like behaviour. Please see http://chronoengine.com/forums.html?cont=posts&f=2&t=12388 for background on creating multiple pages out of 1 form.
I use the code below to check which button was pressed.
Since I have a 'Previous' button on each page, this code no longer works. Can I check on id from the <INPUT type=submit id=button_2 value=Previous> tag?
If so, please provide a small code example.
Thanks you in advance.
Kind regards,
Sweder
I try to split-up a single form in several pages to get a wizard-like behaviour. Please see http://chronoengine.com/forums.html?cont=posts&f=2&t=12388 for background on creating multiple pages out of 1 form.
I use the code below to check which button was pressed.
<?php
$submit = JRequest::getVar('submit', '', 'post');
if ( $submit == 'Previous' ) {
$page--;
JRequest::setVar('page' , 'post' );
}
?>
Since I have a 'Previous' button on each page, this code no longer works. Can I check on id from the <INPUT type=submit id=button_2 value=Previous> tag?
If so, please provide a small code example.
Thanks you in advance.
Kind regards,
Sweder
Hi Sweder,
You can't check the id of a submit button that way but you can put a hidden field on each tab with a distinct value and check that.
Bob
You can't check the id of a submit button that way but you can put a hidden field on each tab with a distinct value and check that.
<input type='hidden' name='page_number' value='2' />
Bob
Hi,
I'm not sure how the hidden field (which I already have) helps me in identifying which button was pressed.
Anyway, I can seem to get it working. Does someone has a example of a three page form with next and prev buttons that allow to move back and forth from page to page?
Any help appriciated.
Regards,
Sweder
I'm not sure how the hidden field (which I already have) helps me in identifying which button was pressed.
Anyway, I can seem to get it working. Does someone has a example of a three page form with next and prev buttons that allow to move back and forth from page to page?
Any help appriciated.
Regards,
Sweder
This topic is locked and no more replies can be posted.