Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.

Add my own validation to Complete button

Avatar

Level 3
Hi,



I was wondering if it is possible to add my own validation code behind the "Complete" button that is present when a form guide is displayed from workspace?



Thanks in advance,

James
1 Reply

Avatar

Level 3
Figured this puppy out at last...



I added two buttons on my form. One is set as a submit button (Submit) and one is a regular button (Validate). Behind the click event on the Validate button I do all my validation checks etc.. and if every thing I need to be filled in is correct I call the following Submit.execEvent("click");



In the form guide properties I set the following properties:



Submit Form: Guide

Submit Button: Validate



Thats it, hopefully someone finds this useful!!