How to reset field values of repeatable sections in Formstack for Salesforce forms

By | January 24, 2024


In this blog post, we will explore the procedure to reset field values of repeatable sections within Formstack for Salesforce forms. By integrating custom JavaScript code, users gain the capability to erase field values within the repeatable sections of Formstack for Salesforce forms. When crafting a form and choosing the ‘Repeating’ option while incorporating a related Salesforce object, the linked Salesforce objects become available for the repeatable section.

Form Settings (Object Selection)
Form Settings (Object Selection)

By default, repeatable sections retain information from the initial entry.

Default Repeatable Section
Default Repeatable Section

Steps to add JavaScript code to reset field values of repeatable sections in Formstack

Note: Formstack package should be installed in your org.

  • Create Formstack form on Salesforce org, drag and drop the Salesforce object fields on the form.
New Formstack form
New Formstack form
  • To add JavaScript code find the ‘form settings’ and find the ‘JavaScript Code’ option, at the bottom of the form settings to reset field values of repeatable sections in Formstack.
Form Settings
Form Settings
  • Next, add the following code to remove field data from repeatable section and reset field values of repeatable sections in Formstack.
reset field values of repeatable sections in Formstack
Javascript Code
  • After adding the JavaScript code next step is to publish the form. To publish the form, click on the Publish Draft button and then click on ‘Publish Options’.
Publish Draft
Publish Draft
  • In ‘Publishing Options’ select ‘Hosted form’ tab and click on form link to reset field values of repeatable sections in Formstack.
Hosted Form Link
Hosted Form Link
  • Lastly check the blank field value of repeatable sections.
Blank Repeatable Section
Blank Repeatable Section

By following the above blog instructions, you will be able to learn How to reset field values of repeatable sections in Formstack for Salesforce forms“

More details about the product are available on our website and Salesforce AppExchange.

We hope you may find this blog resourceful and helpful. However, if you still have concerns and need more help, please contact us at salesforce@greytrix.com.

Related Posts