Copy link to clipboard
Copied
I have a rental agreement that I would like to update with some conditional form fields. I allow my tenants to choose either a 3-month or 6-month autorenewing contract, but also like to spell out for them the months which the contract will renew on. To make it super easy for me, and to not make me look/feel like an idiot counting on my fingers when a tenant sits down with me to sign, I would love to have either a dropdown with the month of the initial signing, that pre-populates the next signing months based on their term.
For example, if they sign a 3-month renewal lease in January, then the next form will auto populate April, the following July, the final in September.
Or, if they choose a 3-month in March it would be >> June >> September >> December.
Does that make sense?
Copy link to clipboard
Copied
Do you have a separate field for the duration of the contract, or do you have one drop-down that corresponds with 3 months, and another with 6?
Copy link to clipboard
Copied
To get the new month names you'll need a mapping object. Then the current month can be identified relative to the following months.
Here's a simple script that is placed in the "Validation" script for the initial signing month dropdown.
The script assumes the names of the next signing months are "NextSign1", "NextSign2", "NextSign3"
var aMonthNames =["January","February", "March", "April", "May", "June", "July", "August", "September", "October","November","December"];
var nMnthNum = aMonthNames.indexOf(event.value);
for(i=1;i<=3;i++)
this.getField("NextSign" + i).value = aMonthNames[(nMnthNum + i*3)%12];
This script can be modified to include the signing period and number of periods.
Copy link to clipboard
Copied
Copy link to clipboard
Copied
You can have one form that includes all options.
However, in order to script the actions you would like, the form fields have to be named. It is the names that the script uses to manipulate the field data.
You can read more about form scripting here:
https://www.pdfscripting.com/public/PDF-Form-Scripting.cfm