Terms & Conditions Checkbox
I want to add a Terms & Conditions checkbox on buddypress signup form. I tried it using: dashboard/users/profile fields ( https://buddypress.org/support/topic/terms-of-agreement-checkbox-for-registration/ ) but I can’t see any changes when I add a new field (It doesn’t matter the kind of field). What am I doing wrong? Buddypress version 188.8.131.52. Theme Mediso.
consider this plugin: https://wordpress.org/plugins/auto-terms-of-service-and-privacy-policy/
and read this plugin support topic:
Create a new page and add your terms of service. Save.
Add a new field to profile Base tab (the one which shows on register page).
Field title: Terms of Service
Field description: by checking this box you agree with our TOS. And a link to the page:
<a href='http://my-site.com/page_name/'>Read our Terms of Services</a>Caution: use single quotes to enclose the url
Field type: checkboxes.
Field option: custom and only one option: TOS ! Leave it unchecked.
On the right of the screen:
Field requirement: required.
Field visibility: only me and check Enforce field visibility
Guess we’re done !
While registering, if the checkbox is not checked, the process will stop and user will be adviced that he omited a field. Once he checked it, he can finish his subscription. This doesn’t mean he read your TOS, but you’re covered if you warned him to read TOS first. And ensure that the link is working and the page exist with content !
Depending your country law, TOS can be more or less regulated. It’s your responsability to get informed about that before using it.
This is a good suggestion but the anchor tag Read our Terms of Services does not show up as a link but is text in the description. Is that correct?
My bad i was viewing in design mode. It works..
This works perfectly! Only one issue…. the link given to the “TOS” opens in a the same window as the registration form. I tried adding target=’_blank’ , but this part of the code gets stripped off. Any suggestions?
i use donmik’s excellent plugin “BuddyPress Xprofile Custom Fields Type” for this…you can add a TOS to xprofile field
Thanks sharmavishal… I am using plugin… and yes I can add hyperlink but not ‘target=’_blank’. If I just add the hyperlink, when the user clicks on the link the TOS page opens in the same tab and is taken away from the form tab, which should not happen!
are you using this one? https://wordpress.org/plugins/buddypress-xprofile-custom-fields-type/
you would need to raise a support request on the plugins forum then
already done that… awaiting feedback… 🙂
Will update this forum, once I get the solution.
You can try BuddyPress Simple Terms And Conditions
cannot get the link to work the html keeps getting stripped using WP 4.53 and BP 2.6
I’m working through this same issue and followed @danbp coding suggestions and have two problems.
1) Even though checkbox is required, I can still create accounts without checking it.
2) clicking the link on it causes a black float box to pop up, with two different lines of text. The first says “click this link” and the second says “Online Privacy Statement”.
Click this link is linked to my “about us” page. How and why this is happening I have no idea. I certainly didn’t type this in anywhere.
The “online Privacy Statement” links to my Privacy Statement, but I don’t call it “online privacy statement”, so where do those words come from?
I’m running WP 4.6 and BP 2.6.2.
What I typed is this:
By checking this box you agree with our
Requirement is “Required” and Visibility is “only me” and it’s enforced.
When I click “Save”, the text I typed is changed to:
By checking this box you agree with our terms
Requirement stays OK, but the Visibility resets to “everyone” and isn’t enforced. See all those backslashes? A new pair (front & back of URL) are added every time I click the save button. You can see I clicked it a lot!
Am I doing something wrong?
i can’t replicate your issue. My snippet works as expected and when TOS box is not checked, the registration is aborded.
You can test the error messages appearing for required fields by going to register page. Don’t fill any field and click on regiter. Does this work ?
Also do you use any kind of plugin on registration page or for xprofile fileds ? Or other custom code ?
The description field is stripped by default. But you should be able to add an href by using single cotes. But that’s all. If you insert a target to href, it will be removed.
Maybe my problem is that I’m not defining the checkbox properly. I just noticed that I’m getting an error message that says “checkboxes require at least one option”
I’d like the checkbox marked by default. Is there a way to put that into the option box? Maybe getting this part right will cause the rest of it to work.
Yes you need one option. The settings i use:
Title: Terms of Service
Description: By checking this box you agree with our Terms of Service (with a link on Terms of Service to the TOS page)
Field type: checkboxes
Option: I agree ( default value: unchecked )
Visibility: just-me with option: enforce visibility
If you use member types, select all MT options
and that’s it
- You must be logged in to reply to this topic.