CMS: Adding and Setting Up a Text Input

3 min read
Add a text input, text box or rich text box element to collect general data from your users such as an email or phone number. Connect the text element to your collection so that you can store and access the info you collect at any time.

Step 1 | Add and Set Up a Text Input Element

  1. Open the Add panel in your Editor:
    • Wix Editor: Click Addon the left side of the Editor.
    • Editor X: Click Addat the top of Editor X.
  2. Click Input.
  3. Click and drag a text element onto your site.
  4. Click Settings.  
  5. Select one of the following options from the drop-down under Type
    • Text
    • Password
    • Email
    • URL
    • Phone Number
  6.  (Optional) Click the Show Input Field Title switch to show the title on your site.
    • Click in the Input Field Title field to change the default text. 
  7. Customize the way your text input looks like on load under Text Settings:
    • None: The field is empty.
    • Placeholder text: The field displays text until the user starts typing. 
      • Enter your placeholder text.
    • Initial text: The field displays an initial value as a default response.
      • Enter your initial text. 
    • Initial text then placeholder text: The field displays an initial value. If the value is erased, the placeholder text appears.
      • Enter your placeholder text.
      • Enter your initial text. 
  8. Choose if the field is required and read-only under General Settings.
    • Required: Users must enter a value in the text input before submitting.
    • Read only: The value of the field cannot be changed by the user. You could use a read-only field to display a calculated value, for example. 
  9. Click the Set Character Limit toggle to set a character limit for the text input.  
  10. Click the Add Pattern Validation toggle to enable regex (regular expression) to apply additional criteria whenever the field is validated. Use the edit box to enter and edit your regular expression.

Step 2 | Connect Your Text Input Element to a Collection

You can connect an Input element to a dataset to capture user input and store it in a collection or edit existing data. 
New datasets experience:
In Wix Studio, we've moved datasets to the Inspector panel on the right to make them easier for you to use. Learn more about the new datasets experience in Wix Studio
  1. Click the Connect to CMS icon  (orin Editor X).
  2. Click Connect a dataset to choose a dataset from the drop-down list.
  3. Click Value connects to to:
    • Choose an existing field in your collection. 
    • Click Add a new collection field to create a new field in your collection. 
      • Enter a field name. 
      • Enter a field type. 
You need to add a submit button to your page to save user data to your collection.

Did this help?