Forum
Subscribe


Terms Acceptance Field

Adding a Field to Accept Terms of Service at Signup
Use this method to add a field to the signup form, that will require members to select a checkbox to say they have accepted the Terms of Service.

This method will add a checkbox to the signup form, and a link to the Terms of Service page. If the user does not select the box, the signup will fail, and they will be asked to select it.

There are two parts to the changes, both made in the page signup.php , but first make sure you make a backup copy of signup.php in case you make a mistake.

  1. At the point in the page where you want the checkbox to appear, add a new table row and cell and include in it this code (change the details to match your program name):
    I agree with the Your Program Name
    <a href="terms.php" target="_blank">Terms Of Service</a><input
    name=userform[terms] type="checkbox" value="1">
  2. Next, find the existing line of code like this:
    <input type=hidden name=required value='username,email,first_name,last_name,address,city,state, zipcode,country,password'>
  3. Add the word ',terms' to it, like this:
    <input type=hidden name=required value='username,email,first_name,last_name,address,city,state, zipcode,country,password,terms'>

The form should now work correctly.