Validate a panel on mobile next button + disable tab navigation | Community
Skip to main content
Ryano_DE
New Participant
March 29, 2021
Question

Validate a panel on mobile next button + disable tab navigation

  • March 29, 2021
  • 1 reply
  • 918 views

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?

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

1 reply

Mayank_Gandhi
Employee
April 27, 2021

@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
Ryano_DEAuthor
New Participant
April 28, 2021
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?