Re: Validation by javascript on Save button

Posted by Alessandro Vernet on
URL: https://discuss.orbeon.com/Validation-by-javascript-on-Save-button-tp4659746p4659761.html

Hi Pouyan,

At this point, this type of partial validation isn't supported. So you can only either validate the form, or not validate it.

If you really need to do this, I imagine you could add a button that runs your JavaScript doing the validation with navigate(uri = "javascript: ..."), and your own JavaScript could, after checking that the email was entered, simulate a click on a button that does the save, but that you hide from the UI with CSS. (And note that this wouldn't be fully "secure", as the validation being done in JavaScript, users could get around your validation by doctoring the code sent to the browser.)

Alex

On Thu, Apr 2, 2015 at 5:40 PM pouyan <[hidden email]> wrote:
Hi Alex

The form is created by form builder , As you said it is "save draft" button
and I am ok with some data
in the form being invalid, but would like at least the email to be
there

Thx
Pouyan


--
View this message in context: http://discuss.orbeon.com/Validation-by-javascript-on-Save-button-tp4659746p4659752.html
Sent from the Orbeon Forms community mailing list mailing list archive at Nabble.com.

--
You received this message because you are subscribed to the Google Groups "Orbeon Forms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].

--
You received this message because you are subscribed to the Google Groups "Orbeon Forms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet