Javascript to stack form fields in list order based on checkbox selection
Disclaimer: Extremely green to javascript.
I'm attempting to create a pdf form (no HTML) That hides/displays certain form fields based on a checkbox.
I've used the 'if (event.' target values to control the hidden/visible function, but I need a method to print the selected form fields in a compiled/organized list view (simply selecting 'print' >'form fields only' won't cut it, as that leads to multiple page breaks and blanks).
(further explanation)
The form is a 'user setup' guide listing multiple systems and applications for a new user that my team will setup access. Based on that new user's role, we'll make selections by checkbox of which programs credentials will need assigned. This is a multi-page document as there are a plethora of systems and apps that may or may not be assigned, listed in alphabetical order.
Say I select two checkboxes that fields are located on Pg 1, and one checkbox that fields are located on Pg 5, and another on Pg 6, etc etc...what I end up with goes something like:
PG 1 - two visible form field sections
PG 2 - blank page
PG 3 - blank page
PG 4 - blank page
PG 5 - one visible section
PG 6 - two visible sections
Is their not a way to compile selected field sections and have them populate one after the other when printing, no matter the order of being selected?
