+1 571-297-6383 | info@sonjara.com

T's and C's PDQ

One feature that is often needed by many applications is a way to make sure that users have agreed to the Terms and Conditions as part of their registration process. For many sites this is an absolute requirement for access, but it can be tricky to get the workflow right. Fakoli has had a feature for a while now that makes this pattern extremely easy to implement.

Step 1 - Add a Terms and Conditions page to your site

If you don't already have one, add a CMS page containing your terms and conditions. I am not a lawyer, so I can't tell you what these should be, but a good resource to get started can be found here.

Step 2 - Register the page as your Terms and Conditions page

In your site admin section, go to Application Settings and find the Terms and Conditions tab. Set the Terms Page Identifier to the identifier of the page you just created, and optionally change the title of the dialog box. To make it so that users must accept the Terms during registration, click the Require Acceptance checkbox. Save the changes.

Step 3 - Add a field to your user profile table to hold the Terms Acceptance flag

In your datamodel, add a field called something like accept_terms to your user profile object (by default this is SiteUser in the user component), like in the example below:

class SiteUser extends DataItem
{
  // Fields

  var $fields = array("user_id"    => Number,
                      "title"      => String,
                      "first_name" => String,
                      "last_name"  => String,

                      ...

                      "accept_terms" => TermsAndConditions);

Add the field into your database schema and update the component and you should be good to go! The TermsAndConditions field renderer will take care of providing a dialog for the user to review the legalese, and will require that users scroll to the bottom of that dialog and hit the Agree button in order to complete their registration.


Making the Tasks Run on Time » « Back to Contents Page
 

Comments

* indicates required field