Jump to content

How to add checkbox on registering new client page


bolu

Recommended Posts

Hi,

I would like to add checkbox in the authentication.tpl so that the customer could not register unless he checks it first. If he tries to register without checking the checkbox he should get the messagebox like it is on order-carrier.tpl. I tried to copy the code from order-carrier.tpl (the terms of use checkbox) but it didn't work. Could anyone please help me with that?

regards

Link to comment
Share on other sites

I figured out how to do this :) In case anyone needs it here is how to do it.

1. Create checkbox.js in the /js catalog with this code:

function checkbox(form) {
   if (
   form.checkbox.checked == false ) 
   {
       alert ('Here you can add the message which will appear in the messagebox if the customer doesn't check the checkbox');
       return false;
   } else {     
       return true;
   }
}



2. In authentication.tpl add this code in line 66

onsubmit="return checkbox(this);"



3. In authentication.tpl add this line:

[removed][removed]

the forum removes this line, I don't know why. It's the same code like in line 7 in order-carrier.tpl but insted of 'conditions.js' type 'checkbox.js'

4. In authentication.tpl in the form add this code:

<input type="checkbox" name="checkbox" value="">  {l s='the text near the checkbox'}




regards

Link to comment
Share on other sites

  • 9 months later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...