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.
SOLVED

Validation Before submit data of web service

Avatar

Level 2

HI guys,

I need ur help as I am using Adobe LiveCycle Designer 8.2 in desiging an offline eform that takes data from user and insert it in a DB using a WSDL of web service in the server . I had now the button that execute the web service method whose parameters are binded to some fields ,But I need to validate those field in time of submittion?

So I tried To write the validation script in the preExec event handler but if that right I need to know how to cancel execution event from preExec?

And if it not right Please help me in another way

Thank You.

Osama

1 Accepted Solution

Avatar

Correct answer by
Former Community Member

To cancel the event (the submit in this case) you woudl use xfa.event.cancelAction = true;

This was added in version 8 I believe so if you are using a Reader/Acrobat earlier than that this will not work.

You could have your real submit button hidden and expose a regular button to the user for submission. This woudl allow you to write code on the regular button to check your validations and if they work out then you woudl hit the submit button programmatically:

buttonName.execEvent("click")

Hope that helps

Paul

View solution in original post

2 Replies

Avatar

Correct answer by
Former Community Member

To cancel the event (the submit in this case) you woudl use xfa.event.cancelAction = true;

This was added in version 8 I believe so if you are using a Reader/Acrobat earlier than that this will not work.

You could have your real submit button hidden and expose a regular button to the user for submission. This woudl allow you to write code on the regular button to check your validations and if they work out then you woudl hit the submit button programmatically:

buttonName.execEvent("click")

Hope that helps

Paul

The following has evaluated to null or missing: ==> liqladmin("SELECT id, value FROM metrics WHERE id = 'net_accepted_solutions' and user.id = '${acceptedAnswer.author.id}'").data.items [in template "analytics-container" at line 83, column 41] ---- Tip: It's the step after the last dot that caused this error, not those before it. ---- Tip: If the failing expression is known to be legally refer to something that's sometimes null or missing, either specify a default value like myOptionalVar!myDefault, or use <#if myOptionalVar??>when-present<#else>when-missing. (These only cover the last step of the expression; to cover the whole expression, use parenthesis: (myOptionalVar.foo)!myDefault, (myOptionalVar.foo)?? ---- ---- FTL stack trace ("~" means nesting-related): - Failed at: #assign answerAuthorNetSolutions = li... [in template "analytics-container" at line 83, column 5] ----