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
BedrockMission!

Learn more

View all

Sign in to view all badges

Validate a panel on mobile next button + disable tab navigation

Ryano_DE
Level 2
Level 2

I'm required to validate a panel on click of the next button.

 

I was able to achieve this using the method described here https://www.tothenew.com/blog/tips-tricks-for-aem-6-2-form-development/#comment-568864

 

But to complete the form also need to:

1) Also apply this rule to the next button rendered on small screens/mobile devices

2) Disable the ability to navigate forward by clicking on the tabs

 

How can I do this?

navigation validation
2 Replies
Mayank_Gandhi
Community Advisor
Community Advisor

@Ryano_DE on next button click call the current panel and validate it. Something like

if(panel1.validate){

guideBridge.setFocus(panel2.somExpression);

 

} else {

// do something else

}. 

Ryano_DE
Level 2
Level 2
The next button clicked rule doesn't fire when the form is rendered on a small screen. This is because the mobile rendered next buttons are different to the next buttons in the toolbar? Or because mobile devices are doing a touch event and not a click?