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.

Validating Forms using Master Page "Next" and "Back" Buttons

Avatar

Level 1

Hi,

I am creating a wizard style PDF with next and back buttons to control the user's progess.

Rather place these buttons on every form I decided to place them on the Master Page.

This has worked well, with navigation, page numbering and button suppression (no back button on the first page/no next button on the last page)  working perfectly.

I am now trying to get execValidate to work on these buttons and am now struggling with the code.

Could someone point me in the right direction.

Thanks,

Dog

1 Reply

Avatar

Level 1

Ok no respone yet so i'm guessing you folks may want some code to work with.

Here's mine, which I've attached to the :click property of the button (in this case the "next" button) on the master page.......and fails miserably.

var testy = xfa.resolveNode("form1.Page" + Str(xfa.layout.page(this)) +".execValidate()");

if( testy == false){

    xfa.host.messageBox("One or more required fields were missing data, please correct them before moving on.");

    }

else {

    xfa.host.pageDown();

    }