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.

How to check whether mandaotry fields are filled in before saving?

Avatar

Level 4
Is there a relatively easy way to check whether all the mandatory fields are filled in before saving the form? I've seen that the "Submit" button does that but I wnat to save the form, not submit it via email. Thanks!
4 Replies

Avatar

Former Community Member
Bill Bain;

You can give me a mail: acrobatman@gmail.com i will give an example.

You must have installed LiveCycle 8 to watch the real JS in example first.

Jasper

Avatar

Level 4
Setup a button or however you want to trigger the check with this:



RootFormName.execValidate();

Avatar

Former Community Member
Building on Thomas's suggestion, you could place that line of script in the pre-save event for the form. That should accomplish what you want to happen.



Good luck!



Ryan D. Lunka

Cardinal Solutions Group

rlunka@cardinalsolutions.com

Avatar

Level 4
Works like a charm -- thanks. I put it on the MouseEnter event of the button so that it fires before the user even has the chance to trigger the save. That way the user could save what they've got and come back later and complete it (assuming that the form has the Reader extensions added).