Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

[AEM Gems Webinar] Accelerating Experience Manager as a Cloud Service development with Rapid Development Environments

System is considering(doing validations) for the HIDDEN pagesd as well!!!

Avatar

Level 8

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

0 Replies