If I enter today's date in Box 1, how can I get Box 2 to auto-fill the same date +30 days?
You can use the following script for the custom Calculate script for the Box 2 field:
// Custom calculate script for Box 2 field
(function () {
// Get date from field
var v = getField("Box1").valueAsString;
// Convert string to date
var d = util.scand("mm/dd/yyyy", v);
// Add 30 days
d.setDate(d.getDate() + 30);
// Populate this field with the result
if (v) {
event.value = util.printd("mm/dd/yyyy", d);
} else {
event.value = "";
}
})();
Replace "Box1" in the code above with the actual name of the field.
North America
Europe, Middle East and Africa
Asia Pacific