Automated Sign-in Sheet
Jump to navigation
Jump to search
Instructions for Automated Sign-in Sheet for printing consecutive dates
[edit | edit source]As of right now, only the first page has a selectable date. The next 13 pages will always run from tomorrow to 2 weeks from the current date. Still a work in progress. Current version is here.
This method puts the code on the entire document, instead of just the field that needs editing. This is less elegant but works. The reason is that Adobe has not patched a bug that deletes relevant code from the validation box in date fields randomly.
Steps to create sheet
[edit | edit source]- Initial document was made in Microsoft Word, original here.
- Saved as PDF.
- Edit with Adobe Acrobat Pro. Using Edit PDF from the right hand sidebar, clean up any text and tables to fit to page. Remove date, as that field will be created later.
- On the right hand sidebar, select More Tools
- Under Forms & Signatures, select Prepare Form.
- In the new Prepare Form ribbon, select the calendar for Add a Date Field. Put the new field where the deleted date was.
- Right click on the date field and select Properties.
- Select the Format tab.
- In the scroll window for formats, scroll to the bottom for custom. In the field below, enter:
dddd mmmm d, yyyy - This will set the date to the long form, with full day and month spelled out.
- On the right hand sidebar, select Organize Pages.
- On the new screen, copy and paste the first page until there are 14 total pages. Click Close.
- Return the the Prepare Form menu. Between the PDF and the right hand sidebar should be a new sidebar. The lower section will show each page with each date field beneath.
- Rename the date fields. Page 1 Date Field should be named "Date0", Page 2 "Date1", etc.
- On the left hand sidebar, select the top option Page Thumbnails.
- Right click on the first page and select Page Properties.
- Select the second tab, Actions.
- In the Add an Action pane, select the trigger Page Open and the action Run a JavaScript. Click Add....
- In the Actions pane, click on the "Run a JavaScript" line and click Edit.
- Paste the text below. Referenced and edited from here.
var date = util.scand("dddd mmmm d, yyyy", event.value); for( var i=1; i<=14; i++){ if(event.value == "") this.getField("Date"+i).value = ""; else { date.setDate(date.getDate() +1); this.getField("Date"+i).value = util.printd("dddd mmmm d, yyyy", date);}}
- Click OK then OK.
- The form is now ready to save. Pages 2-14 (Date1-13 fields) will generate from tomorrow to 13 days away. Page 1 (Day0) can be manually set to any date and printed individually, if needed.