× Joomla Facebook Connect support forum

Topic-icon JomSocial Terms and Conditions on registration Page

Active Subscriptions:

None
15 years 8 months ago - 15 years 8 months ago #4895 by fb_532900746
We need to require our users to agree to the terms and conditions (populated in JomSocial) of the site even though they are registering with FaceBook

We are using v3.0RC2

How can we integrate this?

Thank you
Last edit: 15 years 8 months ago by fb_532900746.
The topic has been locked.
Support Specialist
15 years 8 months ago #4899 by alzander
Thanks for PM'ing us the account that you purchased under.

We don't currently have a method for user's to accept the ToS from JomSocial. Are you using the "Full Joomla User" within JFBConnect? I would think we could help you add the "Agree to terms" checkbox there. If you're using the "Facebook Only" setting though, there's not really a place to do it since the account is automatically created.

We wouldn't be able to get an update out for you this weekend, but we can give you some quick guidance on how you could add the Terms checkbox to the registration page.

First, create a template override of the /components/com_jfbconnect/views/loginregister/tmpl/default.php file ( Instructions for template overrides )

In the new template overriden default.php, add the following at the top right after the <script type="text/javascript"> tag on line 12:
function validate(form) {
  if (!document.form.terms.checked){
    alert("You must agree to the terms");
    return false;
  } 
  return true;
}

Then, in the form area wherever you want the checkbox to be, put:
<input type="checkbox" value="yes" name="terms">I agree to <a href="/LINK TO TERMS">terms and conditions</a>

Finally, you need to tell the form to call the javascript validate function defined above. Find the following code at around line 51, and add the bold statement:
<form action="" method="post" name="adminForm" onsubmit="return validate(this);" style="float:left; width: 45%;">

Hope this helps, and let us know if you have any questions. We haven't tested this exact code, just wrote it on the fly. We've added to our implementation tracker a note to have an option to display and require terms in a future version.

P.S. We'd always recommend upgrading to the latest version, which is 3.0.0. We'll be releasing 3.0.1 this weekend (hopefully) as well, so maybe you can wait till then. The template override should work with all versions.
The topic has been locked.