Expand my Community achievements bar.

Don’t miss the AEM Skill Exchange in SF on Nov 14—hear from industry leaders, learn best practices, and enhance your AEM strategy with practical tips.
SOLVED

How to get 'exit event' script to execute again when form file with saved data is re-opened?

Avatar

Former Community Member

I have created an Adobe Dynamic XML Form using LiveCycle Designer with many fields / subforms that are ‘visible’ or ‘hidden’ dependent upon the options selected from various Drop-Down Lists. The form has also been save-enabled. Users can successfully complete the form and save a copy with the data that has been input.

The problem I have is that when the saved file is re-opened the ‘hidden’ fields / subforms which were previously made visible by selection of the appropriate options from the Drop-down Lists are now NOT displayed. However if you make the same selections from each of the Drop-down Lists AGAIN the hidden fields / subforms are displayed and do contain the data that was entered.

The problem appears to be that the script which determines whether a field / subform is ‘hidden’ or ‘visible’ is an

<event activity="exit" name="event__exit">

which is followed by

if (this.rawValue == "0")- (i.e. the value of the Drop-down List)

sfCompanyDetails.presence = "visible";

sfRecruitmentAgency.presence = "hidden";

etc, etc

and, therefore, it is not executed again when the saved file is re-opened.

Can anyone please advise how to achieve this?

1 Accepted Solution

Avatar

Correct answer by
Level 10

Hi,

check if you activated the option "automatic" to preserve script changes in the form properties.

View solution in original post

3 Replies

Avatar

Correct answer by
Level 10

Hi,

check if you activated the option "automatic" to preserve script changes in the form properties.

Avatar

Former Community Member

Brilliant, excellent, problem solved, and so simple too, many, many thanks!! Nothing I found in searching the in-bulit and online help gave any clue that this was what was required. Spent many hours trying to solve this; wish I had found this forum sooner...

Avatar

Level 1

hi guys hope you can help me

i have a form which has a 3 pages

on initialization of drop down on page 1  page 2 and 3 are hidden

on teh change event of the same drop down using a swtich case either page 2 or 3 is visible and user can fill fields and submit form.

i am able to disbrubute form and collect responses via email.

here is the problem i am facing when i look at he emails recieved page 2 and 3 are hidden by default.

turning scripting to manual under form options>defaults still doesnt  resolve teh issue, any ideas what could help me get the form with the first and the additional page as an attachment.

thanks in advance