Add data from checkboxes in a form

Hi !

I’m building a subscription form with many kind of information and I’d like some of them being choices from checkboxes. My question is: I manage to add the data to the database from input box, dropdown etc… but I don’t how to it from a list of checkboxes… :-/
FYI: I’m pretty new to Bubble and data :wink:

As an example:

The user has to give information about his gender. If I have a check box for “femelle” and an other one for “male”, how can I do for this information to be in the User data?

Thx a lot :slight_smile:

Hello @johann.ouaki,

  • Start a workflow by selecting the checkbox … then right clicking … and selecting start/edit workflow

  • Create 2 workflows with your chosen actions. One for condition checked and a second one for condition not checked (this way you deal with both possible scenarios of the checkbox being checked … or not … everytime the user clicks on it).

  • You can use custom states to house the value of the choice. If you do not know how to use custom states, perhaps you can research on youtube, this forum, etc etc … how they work. A good walkthrough is this one > Custom States | Bubble.io Tutorial

  • Use the custom state’s value in your workflow action to set the value of the user field’s gender. Best way for now until you are more familiar with database models is to make the gender of type text. Later on you can explore option sets. This is a good video to learn how the function.

Best of luck with your app! :+1:

thx for the video it helped :slight_smile:

1 Like