Hello
I have a 4 pages interactive form and a i hv a 3 business scenarios, where in
1) 1st business scenario: All the 4 pages will be launched on the browser
2) 2nd business scenario: the 2nd and 3rd page will be hidden
3) 3rd business scenario: the 1st and 3rd page will be hidden
As soon as user logs into the intranet, user has to select a business scenario, so that, i am passing it(the selected bussness scenario) to form's JavaScript and am wrote the below code
Here BIZ = bussness scenario
if (BIZ = "2") {
form.page2.presence = "hidden"
form.page3.presence = "hidden"
}
Here i am giving just a code snippet (currently our system is down, it will up in next 90 min. and i am newbie to JS)
This is working fine.
But, when user SUBMITs the form, the system is doing all the validations for the hidden pages as well!! the validations includes,
- Mandatory field is populated or not
- is drop-down field has any unknown value or is it populated or not at all
Actually, my idea/impression is that.....when i am hiding the pages, then, the system, should not consider them at all, system should ignore the hidden pages in all aspects/validations
Pls. let me know How can i achieve my requirement?
Thank you
Views
Replies
Total Likes
Hi,
Instead of showing hiding the pages, set them to repeatable in the Object > Binding palette, with the Min count unticked.
if (BIZ == "2") {
form._page1.setInstances(1);
form._page2.setInstances(0);
form._page3.setInstances(0);
}
else if (BIZ == "3") {
form._page1.setInstances(0);
form._page2.setInstances(1);
form._page3.setInstances(0);
}
This way the validations wont be undertaken in pages that are not present.
Niall
Thank you. Actually, i never ticked the repeatable in the Object > Binding palette.
It was unchecked al the time, i never tried to tick it.
Okay, i will insert your code in docReady event of root node, get back to you.
I guess, its docReady event of root right?
If your time permits, pls. let me know that wht is your code doing here by referring INSTANCES?
Thank you
Views
Replies
Total Likes
Or use the exit event of the object that sets the BIZ, business scenario...
Views
Likes
Replies
Views
Likes
Replies