Page 1 of 1
How to add next and prev button in multiple ADD/EDIT page
Posted: Wed Mar 23, 2016 8:42 pm
by wpm
Hello!
I have form form for which I used multiple Tabbed ADD/EDIT/VIEW page feature of Phpmaker. There is ADD and Cancel Button in all pages. I want to use Next and Previous butoon till operator reach last page.
Kindly suggest me how to solve this issue.
Thanks in advance.
Re: How to add next and prev button in multiple ADD/EDIT pag
Posted: Thu Mar 24, 2016 11:05 am
by arbei
There are an option "LastPageSubmit" property of the Multi-Page object.
Read help file topic: "Server Events and Client Scripts" -> "Client Scripts" -> "Example 1".
Re: How to add next and prev button in multiple ADD/EDIT pag
Posted: Sat Mar 26, 2016 7:14 pm
by wpm
Thanks a lot for you response sir, nut I could not find out the solution I already created my project and making copy of this code
"
CurrentForm.ewMultiPage.Set({
LastPageSubmit: true, // Enable submit button for the last page only
HideDisabledButton: true, // Hide disabled submit button
HideInactivePages: true, // Hide inactive pages
HideTabs: true, // Hide all tabs
ShowPagerBottom: true, // Show pager at bottom
PagerTemplate: '<nav><ul class="pager"><li class="previous ewPrev"><a href="#"><span class="icon-prev"></span> {Prev}</a></li><li class="next ewNext"><a href="#">{Next} <span class="icon-next"></span></a></li></ul></nav>' // Pager template
LockTabs: true,// Set inactive tabs as disabled
//ShowPagerTop: true // Show pager at top
});
"
userfn12 file then I copied this code in head tag in header file but nothing happen. Kindly suggest me right way. Thanks you.
Re: How to add next and prev button in multiple ADD/EDIT pag
Posted: Tue Mar 29, 2016 12:46 pm
by arbei
Does not need to copy the code to header, just place the code in [Code (Server Events, Client Scripts and Custom Templates)] -> [Client Scripts] -> [Global] -> [Pages with header/footer] -> [Client Script] then try again.
Use [F12] to see if any JavaScript error returned.
Re: How to add next and prev button in multiple ADD/EDIT pag
Posted: Fri Apr 08, 2016 8:51 pm
by wpm
Hello Sir,
I am tried so many time but fails. I placed the code where you suggested and also followed help file but it still not working.
Re: How to add next and prev button in multiple ADD/EDIT pag
Posted: Sat Apr 09, 2016 11:18 am
by arbei
Your code is not correct:
LockTabs: true,// Set inactive tabs as disabled <- extra comma
Use below code and try again.
CurrentForm.MultiPage.Set({
LastPageSubmit: true, // Enable submit button for the last page only
HideDisabledButton: true, // Hide disabled submit button
HideInactivePages: true, // Hide inactive pages
HideTabs: true, // Hide all tabs
ShowPagerBottom: true, // Show pager at bottom
PagerTemplate: '<nav><ul class="pager"><li class="previous ewPrev"><a href="#"><span class="icon-prev"></span> {Prev}</a></li><li class="next ewNext"><a href="#">{Next} <span class="icon-next"></span></a></li></ul></nav>', // Pager template
LockTabs: true// Set inactive tabs as disabled
});
Re: How to add next and prev button in multiple ADD/EDIT pag
Posted: Mon Apr 11, 2016 1:42 pm
by wpm
Thanks you very much sir.
I tried it so many time. At last I cleared browser history and it started working.
Thanks again.
Re: How to add next and prev button in multiple ADD/EDIT pag
Posted: Thu Jun 06, 2019 1:35 pm
by vlatha1968
CurrentForm.ewMultiPage.Set({
PagerTemplate: '<nav><ul class="pager"><li class="previous ewPrev"><a href="#"><span class="icon-prev"></span> {Prev}</a></li><li class="next ewNext"><a href="#">{Next} <span class="icon-next"></span></a></li></ul></nav>' // Pager template
//LockTabs: true // Set inactive tabs as disabled
//ShowPagerTop: true // Show pager at top
});
not working for me even though i cleared cookies, browsing history etc. i run the same from another client. Pl. help me out
Re: How to add next and prev button in multiple ADD/EDIT pag
Posted: Thu Jun 06, 2019 8:10 pm
by mobhar
Just press [F12] from your browser, and check whether any Javascript error message from the "Console" section.
In addition, shouldn't it be "pagerTemplate" instead of "PagerTemplate"?
Re: How to add next and prev button in multiple ADD/EDIT page
Posted: Sat Jul 27, 2024 8:53 pm
by vintoICT
This is not working in 2024
error ReferenceError: CurrentForm is not defined
Re: How to add next and prev button in multiple ADD/EDIT page
Posted: Sun Jul 28, 2024 12:01 am
by mobhar
For v2024, you may see Example 1 under Client Scripts -> Table-Specific -> Add/Copy page -> Client Script.