cancel
Showing results for 
Search instead for 
Did you mean: 

Field validation - Offline form

Former Member
0 Kudos

Experts,

I have an offline adobe form with 3 text fields. Users can enter up to 250 characters in this field. I need to put a validation that if all 3 fields are having 50 characters each, ONLY then user should be allowed to hit submit button. Please let me know how to handle this scenario,

1) Should we disable or hide the submit button till 50 char is entered or can we show the button but still stop the web service call on button click(Webservice call to send the offline form information to SAP).

Also please let me know how to technically achieve above validation.

Kindly share your valuable inputs.

BR,

Aspire

Accepted Solutions (1)

Accepted Solutions (1)

konchada_saikrishna
Active Participant
0 Kudos

Hi Bharath,

there are 2 solution both by scripting.

1) I would suggest on click event of submit button check the lengths of the fields and display appropriate message,

2) This one I don't like it, disable the submit button by default, now on change event of the three fields check the lengths and then enable it only when they are more than 50 chars, the issue is with out a message users don't get to know why is the button not enabled and which field is less than 50 chars?

Did you get me ?

Cheers,

Sai

Former Member
0 Kudos

Sai,

Thanks a lot for your valuable reply.

1) I would suggest on click event of submit button check the lengths of the fields and display appropriate message

Can you please let me know,

1) Script logic using which we can achieve this validation check

2) Can we trigger this script logic check before the web service call in such a way that ONLY if user has entered above 50 char(in this case script will not be called) only then web service call has to trigger.

It might be a basic thing that I am not able to understand. As I don't know about web service & scripting I am not able to visualize how they both go hand in hand on button click.

Point 2 - I felt the same too. Totally agree with you.

BR,

Aspire

konchada_saikrishna
Active Participant
0 Kudos

Hi Bharath,

follow the below link for a adobe form development which posts data to CRM using webservice.

Your form and fields might vary but the approach is same.

Now when you add a new data source and corresponding submit event a button is placed on the form (in above example "upload" button)

now using script editor check for on submit event of this button. by default ADLC generates code for you which will invoke webservice and post data to it.

here you need to check for your field lengths only when success proceed further else display message and skip web service call.

at this point your requirement is more of an approach than particular issue, so I could only drive you through solution. if there is a particular issue I can help you further with scripts.

Cheers,

Sai

Answers (0)