Expand my Community achievements bar.

Radically easy to access on brand approved content for distribution and omnichannel performant delivery. AEM Assets Content Hub and Dynamic Media with OpenAPI capabilities is now GA.

Javascript validation script kicks off FormCalc error messages

Avatar

Former Community Member

Hi Everyone,

I guess the title of my forum entry is quite mysterious to many of you, so let me explain.

I am currently on a team where we develop with LiveCycle ES and use the process management piece in order to automate processes.

We currently have a Form problem which is a giving us a validation error which doesn't make sense.

The form is mostly using JavaScript in its entirety, but in a few places we use FormCalc for the ease of use.

We just discovered that if one of our Javascript validation fires, it also provokes the FormCalc to popup as part of the error message.

The validation script fires in subform A, and then makes the FormCalc from subform C also show up in the validation script.

The FormCalc is essentially a SUM function to add together all the rows of a table. It works fine with even though we have an error.

There is also a twist to this. The error only happens when subform A isn't visible. You see, in our form, each subform can be collapsed and hidden, to minimize the space it takes.

If subform A's presence property is set to "visible" the FormCalc doesn't fire when the subForm A's validation script fires

If subform A's presence property is set to "hidden" the FormCalc does fire when the subForm A's validation script fires.

it's like it cascades in all the errors or something.

Here is a screenshot of the error:

FormCalc_Error.JPG

Thanks for any help!   

1 Reply

Avatar

Level 10

Hi,

Check out the inactive setting for the presence property. This will hide the subform, but also it will ignore any script within the subform. See: http://assure.ly/h7whb8.

There is another approach, where you set the subform as repeatable without a min count. Then the script is add an instance (show) or setting the instance to zero (hiding) the subform. The downside of this approach is that showing/hiding clears any data inputted into the subform.

Hope that helps,

Niall