question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Exclude hidden fields

See original GitHub issue

Hi,

with parsley 1.x it was possible to exclude fields that are not visible with the following snippet from the 1.x docs:

$( '#form' ).parsley( 'addListener', {
    onFieldValidate: function ( elem ) {

        // if field is not visible, do not apply Parsley validation!
        if ( !$( elem ).is( ':visible' ) ) {
            return true;
        }

        return false;
    }
} );

This is currently not possible with version 2.0 or did I miss something?

Best regards Matthias

Issue Analytics

  • State:closed
  • Created 10 years ago
  • Comments:12 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
guillaumepotiercommented, Mar 16, 2014

Have you tried to add :hidden to the excluded option?

$('#form').parsley({
  excluded: 'input[type=button], input[type=submit], input[type=reset], :hidden'
});
0reactions
chanifiedcommented, Aug 30, 2014

antongorodezkiy I second that. Thanks for your help!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Exclude hidden form fields from submit - Stack Overflow
I'm hiding/showing a div based on the state of a checkbox. <input type= ...
Read more >
How to exclude hidden fields from the email notification ...
Just follow the guide I'm linking below then remove/delete all the hidden fields you don't want to be shown on the email. Complete...
Read more >
Forms 11 - When 'Ignore hidden fields' Field Rules get... ignored
I created a simple form with a single line field shown/hidden based on a checkbox, set it to ignore the value when hidden,...
Read more >
Exclude hidden columns from printing - Airtable Community
Hi, I would like to print an airtable view and exclude certain columns from ... Are you sure you printed the View with...
Read more >
How to Ignore hidden elements #32 - sha256/Pristine - GitHub
I have dependent fields in the form. How to ignore hidden fields from validation. ... Hidden fields are ignored by default.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found