Hello,
I got form with many fields of [value-type=user-entered required], or fields which have some scripting in their validate event handler.
When I use submit button to submit form over http, the form is validated prior submission. Then, when I use execute button (to submit form over SOAP), validation is not called at all.
What is the standard way, to have e.g. required fields on a form and to validate (check values, display error messages, block submission ) form prior to send it over soap ?
I searched the forum history, but I found only the way, that validation is completely scripted and this is called by regular-type button. After it is valid, form is submitted by executing click event on execute-type button.
Thanks.
Solved! Go to Solution.
Views
Replies
Total Likes
When the soap support was added it was intended to get partial informnation into the form and out of the form (think of initializinng dropdown list, filling tombstone information etc). That is why the validations do not fire automatically like they do for a regular submission.
To make the form behave the way you want I woudl add a second button (type is regular) then right code that would fire the validations on the form then call the web service assuming that the validations passed. Assuming the root node of your form is form1, you can do something like this:
if (form1.execValidate) {
WebServicesubmissionButtonName.execEvent("click")
}
By calling the validations on form1, then all validations in objects below this container are executed. If all validations pass a true valie is returned and the webservice submission is triggered. I woudl also make the real WS invoke button invisible.
Hope this helps
Paul
Views
Replies
Total Likes
When the soap support was added it was intended to get partial informnation into the form and out of the form (think of initializinng dropdown list, filling tombstone information etc). That is why the validations do not fire automatically like they do for a regular submission.
To make the form behave the way you want I woudl add a second button (type is regular) then right code that would fire the validations on the form then call the web service assuming that the validations passed. Assuming the root node of your form is form1, you can do something like this:
if (form1.execValidate) {
WebServicesubmissionButtonName.execEvent("click")
}
By calling the validations on form1, then all validations in objects below this container are executed. If all validations pass a true valie is returned and the webservice submission is triggered. I woudl also make the real WS invoke button invisible.
Hope this helps
Paul
Views
Replies
Total Likes
Sorry for late reply and thanks, this is what I needed to know.
Just to be sure,can I have a few more questions arround?
Iif I have a textField, which is declared as a required via gui and later I implement validation event, does validation mechanism still provide check that the field was filled ?
Is there some variable / property, which would hold last validation error message, after execValidate is called ?
Thanks
Views
Replies
Total Likes