Form Design Comments
The following is for the benefit of the admin/form builder and does not appear on the published form.
Input Variables
The Input Variables section of the form contains fields that will be filled in at the time the form is loaded, using URL parameters. These fields are not visible to the user, but will be used for further calculations.
Chapter Account ID is the ID of an account record in Salesforce and should be passed to the form as a URL parameter named ChapterAcctID. (That looks like https://bestbuddies.tfaforms.net/4903689?ChapterAcctID=[AccountID]) Without it, the data from the form will not be imported into Salesforce correctly.
The rest of the input variables will be prefilled with data from the Chapter Account record in Salesforce.
FormAssembly Import ID
Each Contact record that the membership application creates in Salesforce is given a FormAssembly Import ID. This ID is randomly generated by FormAssembly each time the form is loaded and is unique to each Contact. They are used by the Salesforce Connector to reference the same Contact across multiple steps and to add more than one Contact to the same household.
Constants
The Constants section of the form contains text that is set at the time the form was built and will not change. These fields are not visible to the user, but will be used for further calculations.
Default Program ID
If a Program ID is not prefilled based on the Chapter Account ID, Memberships are created in this program. Make sure this ID matches a Program record in Salesforce, otherwise submitting the form may fail and the user will get a confusing error message.
The rest of the constants are pieces of static text that will be conditionally merged into fields presented to the user.
Required E-mail or Phone
In several locations, the form asks for an e-mail or phone (or just a phone) and requires that at least one be filled in. In order to validate this requirement, a third field is created called "Email or Phone Required" (or “Phone Required”). This is a calculated field. It always displays a message explaining the requirement. When an e-mail or phone has been entered, a space (\u0020 in Unicode) is added to the end of the message. The user won't see this space, but the field has a validation rule requiring a space at the end of the text. If the space isn't there, there will be an error message.
This is adapted from the FormAssembly document Use Case: Require Only a Certain Number of Checkboxes (https://help.formassembly.com/help/use-case-require-only-a-certain-number-of-checkboxes)
User Email
This calculated field is the email address of the person filling out the form. The data comes from the Email or Parent Email field, depending on who is filling out the form. It is used as the email address where a notification will be sent after the form has been submitted.
Age Fields
Several sections of the form display conditionally based on the applicant’s age range - Under 13, 13-17, or 18 and older. The form includes JavaScript that will use the Date of Birth to automatically select the corresponding option in a hidden Age Range field, which then triggers the conditional display.
Importing Calculated Data Into Salesforce
When the Salesforce Connector creates records in Salesforce, some of the fields are filled not with a single field from the form, but with a calculated value based on two or more form fields. In some cases, these calculations are done in the Salesforce Connector. In other cases, it is more practical to create a hidden calculated field in the form and pass that data into a Salesforce field.
In particular, there is a repeating section in the second half of the form (“Child Information”). If you create a formula in the Salesforce Connector using fields in a repeating section, the results are a big mess. Instead, all of these are handled with calculated fields within the repeating section, which import into Salesforce correctly.
Periodic Manual Changes
A few of the fields in the form will need to be updated manually at least once a year. These are fields that reference years. The years will need to be changed relative to the current year. The fields are
- Page 1 - This application is for school year. Instead of adding and removing choices, just update the text of the existing choices. Other fields display conditionally based on this field, and adding/removing choices may break that conditional display.
Page 3 - High School Graduation Year
Page 3 - College Graduation Year
Page 5 - I agree to the Best Buddies Member Agreement… (2 fields). Make sure these dates match the choices in “This application is for school year” and that the conditional display of these fields works correctly.
Page 7 - High School Graduation Year
Page 7 - College Graduation Year
Page 8 - I agree to the Best Buddies Member Agreement… (2 fields). Make sure these dates match the choices in “This application is for school year” and that the conditional display of these fields works correctly.