开发者

resetForm() triggering submitHandler and not resetting form values/highlightstates

开发者 https://www.devze.com 2023-02-11 23:27 出处:网络
i have got a problem using JQuery plugin Validation. First of all the code: http://jsfiddle.net/VJKBc/

i have got a problem using JQuery plugin Validation. First of all the code: http://jsfiddle.net/VJKBc/

I have got a form that is being validated by mentioned plugin. The submitbutton ("Speichern") works as开发者_Python百科 expected.

But the resetbutton ("Zurücksetzen") also triggers form validation and does not reset values and highlight.

Can someone please point me into the right direction?


Today i tried some things and nothing worked out very well.

So i made a little workaround and moved the buttons out of the form, asigned a click function to both of them and did everthing within the click functions.

Only thing to worry about is, that my buttons are no longer belonging to the form. But since my form is in a fieldset it all matches together.

Heres the updated jsFiddle

0

精彩评论

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

关注公众号