page.onNext
It is fired before going to the next page. Good for both checking the validation of the current page and set the next page based on values of fields.
Parameters
none
Returns
Type | Comment |
---|---|
{Boolean} false | The current page is invalid, stay here and show an error |
{Boolean} true | The current page is valid, go to to next page |
{String} The current page is valid, go to |
|
Example
If the user is older than 60 years old and doesn’t have internet, he cannot be our new customer, go to the final page.
$('page').onNext = function() {
var age = vcc.getFieldValue('age');
var hasInternet = vcc.isSelected('internet', 'yes', 'export_value');
if (age > 60 && hasInternet) {
return 'final';
} else {
return true;
}
};
Comments
Can’t find what you need? Use the comment section below to connect with others, get answers from our experts, or share your ideas with us.
There are no comments yet.