Agree to License with checkbox before first login.

3 posts by 3 authors in: Forums > CMS Builder
Last Post: October 12, 2012   (RSS)

By Mikey - October 12, 2012

I'd like to have a check box that requires the user to check the box that confirms that they have been made aware of the "License Agreement", were provided a clear opportunity to read it before they log in, and the check box is required at least on the first log in for the user. And if they do not agree to the license agreement, they do not get access to CMS Builder.

The red portion would be a link to the "License Agreement" page (admin.php?menu=license)

username [ ]
password [ ]
[checkbox] I agree with the terms of the License Agreement



Anyone have any suggestions, is there a plugin or can someone provide guidance on building this - before I go poking around in the admin.php file and make a wreck of it? I think it would also need to be a field that is stored within the "accounts" record, but without the ability to edit the check box.

Thanks Zick.

Re: [zick] Agree to License with checkbox before first login.

By gregThomas - October 12, 2012

Hi Zick,

Just out of interest, what is the reason your thinking of doing this? Do you have a specific concerns about the license agreement?

I think the best way to go about this would be to create a plug-in that checks if the user has read the license agreement after they have logged in, and then redirect them to a page with it on and a check box if they haven't.

We would be able to create a custom plugin for you that could do this if you required. If you e-mail consulting@interactivetools.com we can go through exactly what you require.

Thanks!
Greg Thomas







PHP Programmer - interactivetools.com

Re: [zick] Agree to License with checkbox before first login.

By gkornbluth - October 12, 2012

Hi Zick,

If you decide to tackle this yourself, here’s the outline of one approach using if statements that should get you going.

Create a check box called “license agreement” in user accounts.

Create a single record section called “terms”

On your login form page, create a link to the terms detail page with the text “read our terms” or similar.

In your login form, create a check box field for the license agreement with the statement that agreement is required.

Add if statements around the license agreement field so that the field only shows if a check of the value in the user account field returns either empty or zero, and if that is the case, a check in the check box field is required before successful form submission.

Use the same “if” statement approach to show or hide the link to the “terms” page.

Don’t forget the code that inserts a value of 1 if the “license agreement” check box if checked in the form.

There are a few recipes in my CMSB Cookbook www.thecmsbcookbook.com that deal with forms and check boxes, and that include code examples for retrieving values from tables and for error checking.

Good luck,

Jerry Kornbluth
The first CMS Builder reference book is now available on-line!







Take advantage of a free 3 month trial subscription, only for CMSB users, at: http://www.thecmsbcookbook.com/trial.php