Client-side validation in multi-page custom form

Hello. I have a multi-page form with client-side validation active. I'm using the %current_page_contents% keyword in the Page Contents Bodycopy to print each page of the form.


However, this doesn't print out the JS for the client-side validation. %form_contents% does print it out, but it also prints out the whole form.



Is there any way to print just the JS, or another way around this?



Many thanks.



Jamie

Hmm, this smells like a bug.

It is confirmed a bug.


http://bugs.matrix.squiz.net/view_bug.php?bug_id=5904



The workaround is using question keywords for each question in the Form Contents bodycopy. This will register the JS validation functions properly.

Thanks for getting back to me, guys, and for putting the bug into the bug tracker.


I've imported the new packages/cms/cms/form/form/form.inc file into our Matrix installation and %current_page_contents% now prints the validation JS.



That's great; the only issue is that validation is printed for all pages of the form (not just the current page), which means it's looking for form fields which aren't on the page, causing the validation to fall over. It only seems to work when all form fields are printed on every page.



Jamie