Auto-Populate a Custom User Attribute On a Form

In this guide, we will explain how to set and use custom user attributes.

  1. Please export your Formyoula user list from the User page as a CSV file - https://app.formyoula.com/users:
image
  1. Please import the list in Excel or Google Sheets.
  1. Under the column “custom_attributes”, please add the necessary attribute. For example, in this case, we will set the user office location:
{"Office_Location":"Rome"}
image
  1. Please export the updated User list from Excel or Google Sheets as a CSV file:
image
  1. Please import the CSV file on the Formyoula Users page:
image
  1. After the file is selected, the notification will show the number of users that will be updated. Please click “OK” to confirm:

image
  1. Next, we will add a Text field on the form:
image
  1. Please add a JavaScript field on the form, and input the below code:
formyoula.form_fields["2d8b-ceaa-2964"].set({"value":window.formyoula.form_fields.Formyoula_User_Attributes.Office_Location})

Please make sure to change the Text field ID and the exact attribute name in your JavaScript code:

image
  1. Please “Save&Close” the form.
image
  1. Now, once a user starts the form, the Text field will be auto-populated with the custom attribute value:
image

For any questions, please contact us - [email protected] or the Formyoula in-app chat.🙂