Formstack custom formulas can be used in a few different places within Formstack to generate custom values. Custom formulas are currently supported by the following Formstack features:
- You can dynamically populate fields with custom formula results using the 'Populate' action in the rule editor.
- You can set a custom file name for PDF copies of your form.
- You can set a custom file name for files uploaded within a File Upload general field.
- You can set a custom formula for a field's default value.
You can also include fields from your current form as part of your formula as well.
First, find the "Id" of the field you are working with, by right click + Inspecting the input field that you wish to reference. For example, if I wanted to Reference the "Last Name" field from the contact object:
You would write [[Contact.LastName]]
This can have several applications, for example if you want to populate an Account Name field with the First name and Last Name of the user filling out the form, you could create a rule like this:
You can also do basic arithmetic. Here's an example of a formula that outputs 10% of a contact's salary:
Here are some other useful formula samples you can try for yourself:
Note: Custom formulas will only work on your published forms, not when using the preview option.