Copy link to clipboard
Copied
Hello everyone,
I'm looking for help with JavaScript to complete a fillable timesheet form I'm working on. My goal is to create a foolproof form for my staff to use, primarily on iPads, that eliminates transitory documents when submitting to payroll. The form was originally an Excel worksheet, but I converted it to a PDF to streamline the process and ensure consistency.
Most of the form is complete, but I've hit a roadblock with scripting. Specifically, I need to make three fields in each row interact with each other so that selecting an option in one dropdown limits the choices in the others.
The fields are labeled as follows for each row:
There are 18 rows in total (labeled .0 to .17).
For example, if a specific Timecode is selected in a row, I want only the relevant JobNumbers to be available for selection, and then only the appropriate ActivityCodes after that.
Any guidance, examples, or resources to achieve this would be greatly appreciated! Thank you!
Copy link to clipboard
Copied
Before you proceed you need to know that almost no scripts will work on a mobile device. The only app for iPads that has a decent enough support of scripts is PDF Expert by Readdle. So unless all of your users will be using this app, don't waste your time writing scripts that aren't going to work anyway.
Copy link to clipboard
Copied
I agree; most of the scripts I've tried haven't been effective on mobile devices. However, the scripts that do work include column totaling for hours and time calculations. For example, a shift from 7:00 AM to 3:30 PM calculates as 8.5 hours, automatically subtracting a 0.5-hour unpaid lunch to give a total of 8 hours.
Copy link to clipboard
Copied
If you still want dependent dropdowns, you can find scripts here: