Google Sheets can be used as a data source for field options
The custom field type for 'Dropdown with search' has a new setting that allows you to connect to a Google Sheet. This powerful feature gives you the ability to load in a large list of field options without needing to manage the options directly in the app's form builder. Not only does this make a field's options easier to maintain, but this also allows you to offer more than 500 options for a single field!
Steps to enable
To connect a dropdown with search field to a Google Sheet, click on the desired field and scroll down to the 'Choices' section in the field editor (found in the left pane in the form builder). Select the 'Google Sheet' option, and then click the button for 'Connect sheet':
In the modal that pops up, paste in the URL for the public Google Sheet and click the 'Connect' button:
Once connected, the app will automatically pull the data from the Google Sheet you specified and use each row to populate the field's list of options.
Please note that the field options will not show directly in the field editor, but they will show in the 'Preview' tab of the form builder (and on the storefront assuming the form has been saved & installed on a theme).
Any changes made to the Google Sheet are automatically saved by Google's system, and these changes will be reflected on the field once the form has been rendered. There's no need to re-save any changes in the form builder since the field's options are dynamically loaded from the connected Google Sheet.
Pro-tip: When a form rule is using a condition that is tied to Google Sheets-connected field/data column, make sure you enter the actual value into the rule's condition, not the label.
Sheet configuration and formatting
To ensure that the app can properly parse the data in the Google Sheet, please keep the following in mind:
Make sure that the Google Sheet is publicly accessible. This can be done by editing the sharing settings for the document and enabling 'Anyone with the link' (see screenshot)
Only the first sheet in the document will be used for the field data. Any additional sheets in the document will be ignored.
If the first row in your sheet is meant to act as a header, then you should remove the entire row. Each row in the sheet will be used as a field option.
The first column in the sheet (Column A) is used to define the field's option labels. The second column in the sheet (Column B) is used to define the field's option values.
You don't need to use separate labels and values for the field options. If you want the field options to use the same label and value, then you only need to include one column in the sheet (Column A).
The data format for all of the cells in the sheet should be set to
Plain text. You can find this in the Google Sheets menu bar under Format > Number > Plain text.
Remove any blank rows from the sheet to ensure that the count of field options is accurate.
You can find an example of a Google Sheet with the proper formatting using the button below:
Have questions or need help?
Feel free to reach out to our support team via chat or email and we'll be happy to assist! 🤗