Skip to main content

Checkbox Groups

Duncan from Memberstack
Duncan from Memberstack

This article will show you how to store the data of multiple check-boxes as a comma-separated list inside Memberstack. This other article can show you how to set up a single checkbox.

This feature is also super handy for creating custom select fields like these 馃憞 (They are just fancy check-boxes under the hood).

Screen_Shot_2022-12-08_at_9.46.09_AM.jpg

1) Video Tutorial

Here's a link to clone the project seen in the video.

2) Create a Wrapper Element

Somewhere inside of a profile or signup form, you'll need to add a div. And then, you'll need to give that div an attribute of data-ms-member="Your_Field_Id" where "Your_Field_Id" points to a custom field inside your Memberstack account. 

3) Add your Checkboxes

Next, you'll want to add all of our checkboxes inside of the wrapper element. For this to work, each checkbox's input is going to need a data-ms-value="Your_Value" attribute where "Your_Value" is what you want to be saved in Memberstack. 

Screen_Shot_2022-09-23_at_9.22.47_AM.jpg

 

Was this article helpful?

Didn鈥檛 find your answer?

Get an instant answer from Rey, or reach a human. Either way, we鈥檙e happy to help.

Comments

7 comments

  • Bas Rijnen
    Bas Rijnen

    Can i change this up so that there is a space behind every comma? I need this because right now it looks funny in a profile input field, but like this it's also not compatible with comma seperated fields of for instance Typeform.

    Thanks in advance

    2
  • Duncan from Memberstack
    Duncan from Memberstack Author

    Hey Bas, thanks for posting your question!

    We don鈥檛 have a way to format how the data is output at this time. :( One workaround I can think of would be to format the data in the front end before passing it along to Typeform. But that really depends on what you're trying to achieve. I鈥檒l ask around to my colleagues to see if anyone has a workaround they can think of, but if you have any questions in the meantime, please let me know!

    0
  • William de Broucker
    William de Broucker

    Hello,聽

    Can I make the checkbox group required ? (ie. at least one checkbox of the group needs to be checked)聽

    Thanks,

    William

    0
  • Grant Faucher
    Grant Faucher

    How do make a custom select and search using a collection list for the select options? Active selected items are not being organized at the top for results.

    2
  • Duncan from Memberstack
    Duncan from Memberstack Author

    Hi Grant Faucher 馃憢 Can you share a read only link to your project?

    1
  • Yashwin Naidu
    Yashwin Naidu

    but how to save that in memberjson?

    0
  • Duncan from Memberstack
    Duncan from Memberstack Author

    Hi Yashwin Naidu 馃憢

    You'll need to use the DOM package and custom code to save custom fields to JSON.聽

    I recommend looking at our MemberScripts page and searching for checkbox. https://www.memberstack.com/memberscripts

    0

Please sign in to leave a comment.

Sitemap