"Display stage action buttons on this page." does not work properly.
Multiple pages were created for one form.
I unchecked "Display stage action buttons on this page." on the default page (Page1).
And on the second page (Page2), I checked the "Display stage action buttons on this page.
When the data is created in this application, the stage action buttons on Page1 are not displayed in the start stage.
However, when I send the data and display the created data, it is in the Submitted stage, but the stage action buttons are displayed on Page1.
Since we want to send the data after having it entered on Page 1 and confirmed on Page 2, I don't want to display the stage action button displayed on Page 1.
If anyone knows a way to avoid this, please let me know.
I am attaching the volt file of the sample application.
StageTest.zip
I believe this may be because you are an administrator and the access controls allow "Update" for administrators. If you remove that Update permission for the "Submitted" stage then the buttons won't show. Or create the entry by a non-admin and they shouldn't show.
Thank you.
Indeed, when I tried it with a non-administrator user, the Update button did not appear.
However, the [Cancel] button does appear, so it did not work as I thought it would.
I believe this is a defect, as I have encountered it before. It can be a tricky one to reproduce consistently, which is why it has not been addressed. I will investigate further given your specific example.
There is a way to work around it. You can use javaScript to force the buttons to be hidden.
The event order is page onShow and then the global onShowActionButtons.
In the onShowActionButtons add:
//hide all submit buttons
var actionButtons = form.getStageActions();
for(var i=0; i<actionButtons.length; i++){
get(actionButtons, i).setVisible(false);
}
Then in the onShow event of Page 2 add:
//show all submit buttons
var actionButtons = form.getStageActions();
for(var i=0; i<actionButtons.length; i++){
get(actionButtons, i).setVisible(true);
}
In this app there is no way to get back to the first page, but if you change that, then you will want to add the following to the onShow event to hide the buttons again:
//hide all submit buttons on first page
var actionButtons = form.getStageActions();
for(var i=0; i<actionButtons.length; i++){
get(actionButtons, i).setVisible(false);
}
I added this code to your application and then I no longer saw the buttons on the first page.
Thank you for providing this example, we will investigate it further to see if we can address the root cause, but the workaround I provided should enable you to continue.
Please let us know if you have any questions or concerns!
Thank you very much.
I added the javascript you gave me to the program, and it works as I thought it would.
I hope this will be fixed in a future version, but I think this method is sufficient.