How would I add a "Click here to Agree" checkbox that is stored in the User portion of database?

Hello,

I am attempting to store a checkbox in the User Database that would confirm a User agreed to the terms and conditions by clicking the checkbox.

I am using the out of the box Bubble Sign Up / Login Form and would simply like to add a checkbox from the input form section so that when checked it is databased along with the Sign Up form process.

Any help would be greatly appreciated.

Thank You,

Jibby

You’ve pretty much described exactly what you need to do in your question…

i.e.

add a checkbox element
Then set the User’s agreed to terms field to ‘yes’ when you sign them up, assuming the checkbox is checked.

if you make it mandatory for the checkbox to be checked, then you can just set it to ‘Yes’ (as the workflow can’t run if it’s not checked). Otherwise set it to ‘when checkbox it checked’’.

Hi there, @Jibbystyle… here is how I might do what you described. First, you could add a field on the User data type called something like agreed to terms (yes/no), and default the field’s value to no. I might also consider adding a corresponding date field in which you store the current date/time when a user signs up so you know exactly when they agreed to the terms (yes, you could use the created date of the user, but that wouldn’t always be accurate for reasons I won’t go into here).

With the field(s) I mentioned in place, add a checkbox to the form, and make the sign up button not clickable when the checked isn’t checked. You might also consider adding a workflow event that says when the sign up button is clicked and the checkbox is not checked, show a message to the user that says they have to agree to the terms. Note that it shouldn’t be necessary to add that workflow because the button won’t be clickable when the checkbox isn’t checked, but it wouldn’t hurt to add that extra layer.

Finally, add a workflow event that says when the sign up button is clicked and the checkbox is checked, sign the user up. In that workflow, change the agreed to terms field for the user to yes, and save the current date/time if you’d like.

Hope this helps.

Best…
Mike

2 Likes

Hello,

Ok Nice. I got this working but I didn’t need to create an additional workflow necessarily in the sign up process.

I just added Change Another Field to the original sign up workflow dropdown.

It appears to have worked when I look at the database and the timestamp appears accurate with the original built in date / time. Care to elaborate why there may be errors on the baked in timestamp ? It seems repetitive to do twice if this is accurate.

Please let me know if what I created looks correct and secure. It seems to be working perfectly when I try it.

https://informationzilla.com/version-test?debug_mode=true

Give it a twirl if you would like.

Thanks,

Jibby

Yup, that’s what I meant.

Yup, that’s what I meant.

The button is disabled until the checkbox is checked, so if the value is being saved correctly in the database, then you’re good to go.

About the timestamp not necessarily being accurate, it has to do with the fact that the user might not sign up immediately upon visiting your site, but Bubble has still created a user for them (which could exist for up to 3 days before they actually sign up). The extra date field could be viewed as redundant, though, so no need to keep it if you don’t think it’s necessary.

1 Like

Hello,

Thanks again… You da man. I’ll keep the extra date up for a while and see if there is any mismatches and take down once confirmed irrelevant.

I appreciate the assistance.

Thank You,

Gabriel

1 Like

Cool… happy to help. Oh, and I had misread your previous reply, and I have edited my last reply now that I understand what you were asking… sorry about that.