NetTalk Central

NetTalk Web Server => Web Server - Ask For Help => Topic started by: Neil Porter on March 24, 2016, 01:52:10 AM

Title: Best place for additional Netweb Form Validation?
Post by: Neil Porter on March 24, 2016, 01:52:10 AM
I'm using a Netweb Form to gather input from a user. Once I've completed my own validation (checked fields have been populated etc.) I need to post the results to an external 3rd Party Webservice, which will further validate the data returning a success for fail.

I've been using the "ValidateAll" embed to add my call the the extra web service because I don't want the contents of my form being saved unless I pass the 3rd party validation.

On the face of it everything works fine, and has been in production for some time, BUT we get occasional queries about duplicates being posting to the 3rd Party Webservice. We've never been able to reproduce this, and it seems very random.

By chance yesterday we stumbled upon the issue. Our Netweb form remains visible whilst the call to the 3rd Party web service is completed. If this call is slow (maybe a second or 2 to complete) it is possible that a user can press the save button on our form multiple times believing that the page has hung, causing multiple duplicate posts to the 3rd party.

Can anyone suggest a better way of achieving what I want, or an alternative embed, or even a way of stopping the user pressing the save button on the form multiple times?

Regards,

Neil Porter
Title: Re: Best place for additional Netweb Form Validation?
Post by: Vinnie on March 24, 2016, 05:13:34 AM
Hi Neil.

Maybe an option to have an Other button on you form which would be the 'Validate Button'

The user would need to press the 'Validate' button which would run the 3rd party validate.

You can Disable / Enable the 'Validate' button in you validate routine.

Cheers

Vinnie

 
Title: Re: Best place for additional Netweb Form Validation?
Post by: Aje.elias on March 24, 2016, 05:23:30 AM
Hi,
I suggest that you try creating a new thread for that code. Example:

Start(Source_Procedure,25000, parameters)

Where in Source_Procedure, must be the call extra webservice..


Best Regards!

Alejandro Elias
Title: Re: Best place for additional Netweb Form Validation?
Post by: Bruce on March 29, 2016, 11:34:13 PM
an upcoming build should disable the "save" button when it is pressed the first time.

cheers
Bruce
Title: Re: Best place for additional Netweb Form Validation?
Post by: Neil Porter on March 30, 2016, 08:38:52 AM
Thanks Bruce.

I have got my code in the "Right" place then?

Regards,

Neil.
Title: Re: Best place for additional Netweb Form Validation?
Post by: Bruce on March 30, 2016, 11:52:32 PM
yes, I think so.