Agree to License with checkbox before first login.

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

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

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.

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