Elxis CMS Forum

Extensions => Components => Topic started by: ArXoS on May 31, 2011, 03:18:18

Title: com_registration: I agree check box [SOLVED]
Post by: ArXoS on May 31, 2011, 03:18:18
Hello Elxis
Is there any easy way to add an check box to registration form (com_registration i guess), so new users must check it to be able to continue their registration in Elxis? Something like "I Agree" box ?
Thanks
Title: Re: com_registration: I agree check box
Post by: ArXoS on May 31, 2011, 14:31:14
Οκ, i found a way for that. Its working pretty well. The file was registration.html.php
Take a look at http://www.greekmasa.gr/index.php?option=com_registration&task=register
Title: Re: com_registration: I agree check box
Post by: webgift on May 31, 2011, 14:50:48
You can post the solution here Arxos. It might be interested at future.
Title: Re: com_registration: I agree check box
Post by: ArXoS on May 31, 2011, 15:05:41
no prob
file:components/com_registrationregistration.html.php
change
<input type="button" value="<?php echo _E_SEND_REG; ?>" title="<?php echo _E_SEND_REG; ?>" class="button" onclick="submitbutton()" />
to

<p><input type="checkbox" onclick="if (this.checked){this.form.agree.disabled=0}else{this.form.agree.disabled=1}">Your text</p>
<input type="button" name="agree"  disabled="1"  value="<?php echo _E_SEND_REG; ?>" title="<?php echo _E_SEND_REG; ?>" class="button" onclick="submitbutton()" />

In my site, i added 2 checkbox, the first enables next ect, till final button
Something like this

<p><input type="checkbox" onclick="if (this.checked){this.form.agree1.disabled=0}else{this.form.agree1.disabled=1}">Your text 1</p>
<p><input name="agree1" type="checkbox" disabled="1"  onclick="if (this.checked){this.form.agree2.disabled=0}else{this.form.agree2.disabled=1}">Your text 2</p>
<input type="button" name="agree2"  disabled="1"  value="<?php echo _E_SEND_REG; ?>" title="<?php echo _E_SEND_REG; ?>" class="button" onclick="submitbutton()" />

I find it very useful
Title: Re: com_registration: I agree check box
Post by: webgift on May 31, 2011, 15:41:39
Don't forget to mention that changes became at Elxis 2006.4 right?
Title: Re: com_registration: I agree check box
Post by: ArXoS on May 31, 2011, 15:49:29
no, first edit is from registration.html.php of Elxis 2009.1

second (with 2 checkboxes) from Elxis 2006.4.

Registration.html.php is very near in all editions
Title: Re: com_registration: I agree check box
Post by: herve34000 on June 01, 2011, 16:29:28
Hi ArXoS,

This nice to think about that. I have a version Elxis v2009.2. I try to put this code, but not work ???

can you help ?

Cordially Herve
Title: Re: com_registration: I agree check box
Post by: nikos on June 02, 2011, 01:42:10
No need for any customization for this, because you can do it very easy by soft disk in Elxis versions 2008.x and 2009.x as following:

1. Create an autonomous page naming as (for example) "Terms of registration" and write there anything you like or let it empty. Save and publish the autonomous page to the language version you like and check what id number it has.

2. Then go to Components -> Softdisk -> and create a new one selecting

Section -> Users

Name -> REG_AGREE_LANGUAGE (example: REG_AGREE_ENGLISH)

Type-> INTEGER

Value -> the id number of the autonomous page

Save it and you are ready.

The same one you can do for any published language of your site.
Title: Re: com_registration: I agree check box
Post by: herve34000 on June 02, 2011, 06:11:16
Hi nikos,

Thank's very much. Solved  ;)
Title: Re: com_registration: I agree check box
Post by: nikos on June 02, 2011, 10:54:40
You are welcome  :)
Title: Re: com_registration: I agree check box
Post by: ks-net on June 02, 2011, 14:31:21
http://wiki.elxis.org/wiki/Multilingual_terms_and_conditions

P.s  Please mark topic as solved!