This topic is locked

confirmation page before record operation

8/25/2011 2:02:11 PM
PHPRunner General questions
T
techster author

Hi
I have found many resources on asprunner but I fail to understand how to implement a confirmation page on phprunner.
Scenario:

User adds information or edits it.

He/she should get a confirmation page with all the information before one can click submit; with an option to edit if required.

Once edited/updated the complete record is to be sent to 2 email addresses.
TIA

C
cgphp 8/26/2011

In the javascript OnLoad event:

this.on('beforeSave', function(formObj, fieldControlsArr, pageObj){

alert("Are you sure ?");

});
T
techster author 8/26/2011



In the javascript OnLoad event:

this.on('beforeSave', function(formObj, fieldControlsArr, pageObj){

alert("Are you sure ?");

});



Cristian, won't this just display a message box/alert?
What I am trying to achieve is when a user fills information and press, submit, he should be presented with the information that he/she has filled in. Acts as a double checker. At times one might commit human error, to prevent that I want to implement it.
Thanks.

C
cgphp 8/26/2011
var ctrlName = Runner.getControl(pageid,'NameField');

var ctrlEmail = Runner.getControl(pageid,'EmailField');
var message = "Do you confirm the following information?\n\nName: "+ctrlName.getValue()+"\nEmail: "+ctrlEmail.getValue();
this.on('beforeSave', function(formObj, fieldControlsArr, pageObj){

return confirm(message);

});