Skip to main content
jonathanm75257324
Known Participant
May 23, 2019
Question

Multiple Checkboxes Trigger Dynamic Fields

  • May 23, 2019
  • 1 reply
  • 335 views

I am making a very complicated form where the user has the option to add new users and make selections based off of selections on the static (non-spawning) pages.

The first three pages are static, and the last two can be spawned (in order) unlimited times. The selections made on the first three pages can impact what is shown on the spawned pages (when new users are being added).

I am currently struggling to create a script where the fields updated on the new pages (as the name of the field has changed) to reflect any change (on the first three pages) that may be made after the page has been spawned.  The form is able to use the logic on the dynamic pages as the field name has been updated, but it does not work when the fields on the new page need to be based off of the static (non-spawned) pages. Any help here would be greatly appreciated.

This topic has been closed for replies.

1 reply

Joel Geraci
Community Expert
Community Expert
May 28, 2019

The easiest way to handle calculations and dependent values when working with spawned pages is to put all of the calculations into a document level script and trigger it using a single hidden field on a non-spawned page (like the first). Field names on spawned pages will be renamed as they are spawned but will do so in a predictable manner. Also in your spawn code, keep track of how many times a template has been spawned and what page number it resulted in.

Don't add Calculation scripts to any other fields. Formatting and validation scripts are OK.