CMS: Setting Up a Multi-Checkbox Input Element

18分
Use the Multi-Checkbox input element to let visitors filter live site content or submit multiple choice responses. 

For instance, imagine you run an online bookstore. You can use a Multi-Checkbox input element to let visitors filter books by genre, author, or publication year. This not only improves their browsing experience but also helps you understand their preferences better. 

Or, you could set up the Multi-Checkbox element to collect information about the types of books your visitors enjoy. For example, you can ask users to select their favorite genres, such as mystery, romance, or science fiction, when they sign up for your newsletter. This collected data can help you tailor your marketing efforts and recommend books that align with their interests.
ヒント
This article is about setting up the Multi-Checkbox input element. Alternatively, you can use a single Checkbox input element to let visitors filter or submit content. The single Checkbox input element works with boolean (true or false) collection fields only. 

Using the Multi-Checkbox input element to filter content on your live site

Connect your Multi-Checkbox input element to the same dataset as your repeater, gallery, or table and set it to filter content. Then choose the collection field you want to use as the filter and the condition for applying the filter. The values from the field will appear as checkboxes your visitors can click to filter items displayed in the repeater, gallery or table. 
Wixエディター
スタジオエディター
  1. 編集者のところに行ってください。
  2. Add the Multi-Checkbox input element: 
    1. Go to the page where you want visitors to use checkboxes to filter live site content.
    2. クリック エレメントの追加  エディターの左側にある
    3. Click Input.
    4. Click Checkboxes
    5. Click and drag the relevant Multi-Checkbox input element onto the page. 
Screenshot of adding a Multi-Checkbox input element in the Wix Editor.
  1. Connect the Multi-Checkbox element to the CMS:
    1. をクリックする。 CMSへの接続 アイコン  on the Multi-Checkbox element. 
    2. Select Filter content in the panel on the right. 
      Tip: If you haven't added a dataset to the page yet, add a dataset first (see the next step) then select Filter content
    3. Click the Choose a dataset drop-down and select the same dataset that connects to the elements (e.g. repeater, gallery, table) that you want visitors to filter. 
    4. Click the Filter content by drop-down and choose the collection field that visitors will use to filter the content. You can connect the following field types: Text, Number, Tags, Reference
      Tip: To add a new field to your collection and use it for filtering content, select Add new field, enter the field name, select the field type, and click Add. You can add values to the field in your CMS collection later
    5. Click the Condition drop-down and choose an operator that controls how the filter is applied (e.g. Is any of, Equals any of, Includes any).
      Note: The conditions vary depending on the connected field type. 
Screenshot of the dataset connection settings for the Multi-Checkbox element.
  1. Customize the Multi-Checkbox input element: 
    • をクリックする。 設定 アイコン  to edit the field title that lets visitors know what the checkboxes do. 
    • をクリックする。 レイアウト アイコン  to choose a horizontal orientation or adjust the sizing, spacing, formatting, alignment or text direction. 
    • をクリックする。 Design アイコン  to choose a preset design and customize it further. 
    • をクリックする。 Animation アイコン  to choose and customize an animation effect. 
Screenshot of the layout settings for the Multi-Checkbox input element.
  1. Click Preview to test your Multi-Checkbox element.
  2. 変更を公開する準備ができたら、「公開」をクリックします。 

Using the Multi-Checkbox input element to collect responses from site visitors

Set the Multi-Checkbox input element to collect content and connect it to a dataset that binds to a collection where you will store the responses. Then set up the choices that visitors can select from in the checkboxes. When visitors click your submit button, their responses are saved to a tags field in your collection. 
Wixエディター
スタジオエディター
  1. 編集者のところに行ってください。
  2. Add the Multi-Checkbox input element: 
    1. Go to the page where you want visitors to click checkboxes to submit responses. 
    2. クリック エレメントの追加  エディターの左側にある
    3. Click Input.
    4. Click Checkboxes
    5. Click and drag the relevant Multi-Checkbox input element onto the page. 
Screenshot of adding a Multi-Checkbox input element in the Wix Editor.
  1. Connect the Multi-Checkbox element to the CMS collection where you will store the submissions:
    1. をクリックする。 CMSへの接続 アイコン  on the Multi-Checkbox element. 
    2. Select Collect content in the panel on the right. 
      Tip: If you haven't added a dataset to the page yet, add a dataset first (see the next step) then select Collect content
    3. Click the Choose a dataset drop-down and select a dataset that connects to the collection where you will store the submissions.
    4. Click the Value connects to drop-down and choose a Tags field to store the submissions.  
      Tip: To add a new field for storing submissions, select Add new field, then enter the field name and click Add
    5. Set the dataset mode and collection permissions:
      1. Click Dataset Settings
      2. Click the Dataset mode drop-down and select Write.
      3. (If necessary) Click the permission type next to Permissions to edit your collection's permissions & privacy settings. Then choose the type of permissions you want to set:
        • Collect content: Allow visitors to add content to the collection with input elements or API. Then choose who can add content to the collection and who can view the content. Then click Save.   
          Note: This permission does not allow visitors to update existing content in the collection. Use the Custom permissions if you want to allow visitors to update existing content. 
        • Custom: Set custom permissions to control who can view, add, update, and delete content. You can choose different permissions for item creators, site members, and everyone else. Click Save when you're done setting the permissions. 
      4. Click Back to Multiple Choices element at the top of the Dataset Settings panel. 
Screenshot of the dataset settings for a connected Multi-Checkbox element set to collect content.
  1. クリック Manage Choices and choose how you want to set up the choices that appear as checkboxes:
    • Bulk add or remove choices: Click Add Multiple Choices and enter all the choices with each separated by a comma. Then click Back to return to the choices.  
    • Add a choice: Click + Add a Choice, then use the options to customize it. 
    • Edit a choice label: The label is the text visitors see next to the choice's checkbox. Double-click the relevant choice to edit its label. 
    • Edit a choice value: The value is the text that is saved to your collection field when visitors submit their response. Hover over the relevant choice, click the その他のアクション アイコン  and select Edit value
    • Remove a choice: Hover over the relevant choice, click the その他のアクション アイコン and select 削除
    • Reorder choices: をクリックする。 Reorder アイコン  next to the relevant choice and drag it up or down in the list of choices. 
    • Set a choice as checked by default: Hover over the relevant choice, click the その他のアクション アイコン and select Check by default.
    • Duplicate a choice: Hover over the relevant choice, click the その他のアクション アイコン and select Duplicate.
Screenshot of managing the choices that appear next to the checkboxes.
  1. Customize the Multi-Checkbox element's settings layout and design: 
    • をクリックする。 設定 アイコン  to edit the following: 
      • Field title: Edit the title text that lets visitors know what the checkboxes do. 
      • Field type: Select the Required checkbox to make it mandatory that at least one checkbox is selected before the response can be submitted to your collection. 
    • をクリックする。 レイアウト アイコン  to choose a horizontal orientation or adjust the sizing, spacing, formatting, alignment or text direction. 
    • をクリックする。 Design アイコン  to choose a preset design and customize it further. 
    • をクリックする。 Animation アイコン  to choose and customize an animation effect. 
  2. Add a 'Submit' button for visitors to click to send their submissions. 
Screenshot of a submit button and its dataset connections.
  1. Click Preview to test your connections. 
  2. 変更を公開する準備ができたら、「公開」をクリックします。 

よくある質問

Click a question below to learn more about the Multi-Checkbox input element.

これは役に立ったか?

|