Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions src/core.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,11 @@ $.extend( $.fn, {
var hidden, result;

// Insert a hidden input as a replacement for the missing submit button
// The hidden input is inserted in two cases:
// The hidden input is inserted when user doesn't define `disableHiddenInput` as true and one of these two cases are fulfilled:
// - A user defined a `submitHandler`
// - There was a pending request due to `remote` method and `stopRequest()`
// was called to submit the form in case it's valid
if ( validator.submitButton && ( validator.settings.submitHandler || validator.formSubmitted ) ) {
if ( validator.submitButton && ( validator.settings.submitHandler || validator.formSubmitted ) && !validator.settings.disableHiddenInput ) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

comment above is now outdated.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment changed

hidden = $( "<input type='hidden'/>" )
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Arknis idea was to add autocomplete off to this input which is beeing injected

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it doesn't work neither

.attr( "name", validator.submitButton.name )
.val( $( validator.submitButton ).val() )
Expand Down Expand Up @@ -261,6 +261,7 @@ $.extend( $.validator, {
validClass: "valid",
errorElement: "label",
focusCleanup: false,
disableHiddenInput: false,
focusInvalid: true,
errorContainer: $( [] ),
errorLabelContainer: $( [] ),
Expand Down