开发者

Post extra string through ajax form validation script

开发者 https://www.devze.com 2023-02-20 22:56 出处:网络
I am trying to pass a custom variable and value through ajax when the form submission event starts, they have this option when you validate field on blur but when the form is submitted I don\'t see ho

I am trying to pass a custom variable and value through ajax when the form submission event starts, they have this option when you validate field on blur but when the form is submitted I don't see how to add custom variabl开发者_JS百科e to this.

This what they have in on blur validation jquery.validationEngine-en.js

"ajaxUserCall": {
                    "url": "ajaxValidateFieldUser",
                    // you may want to pass extra data on the ajax call
                    "extraData": "name=eric",

but there are no options for form submission.

Maybe someone can take look at script and tell me how can i add extra variable with the form?

  • The demo is here
  • The script is here
  • Settings for script
  • The home page is here


Separate extra Post data with the & separator. For example:

name=eric&this=that&lastname=johnson

It's the same way you add extra GET data in a plain php/html form, except with ajax you pass post data the same way. Was this your question? Maybe I misunderstood.

0

精彩评论

暂无评论...
验证码 换一张
取 消