You are viewing limited content. For full access, please sign in.

Question

Question

Pagination: Tab validation for Parsley not working

asked on January 10, 2019

I am working on some javascript to validate that the required fields have been completed before allowing the user to continue to the next tab on Laserfiche Forms. From several of the other posts I saw that we should use something similar to 

($("#form1").parsley({excluded:":hidden"}).isValid()

but whenever i try to run some code with it my DevTools shows an error:

Uncaught TypeError: $(...).parsley is not a function
Has anyone else had an error like this? And if so what do i need to do to fix it?

0 0

Replies

replied on January 11, 2019

Just looking at your code, it looks like you have an extra "(" in the front. 

I was thinking about this. Could you add a class to all the fields on a particular tab such as "tab1" and then validate only those fields before moving to another tab? Then when the user goes to the next tab validate those fields only using the same method ("tab2" class assigned to fields on next tab). I am not sure, but you could probably swap out #form1 with tab1, etc..

Just a thought, hope it helps.

Chris

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.