Page 1 of 1

Registration page

PostPosted: Wed Dec 09, 2009 11:42 am
by zedimus
Hi Steve
On the registration page i want to add a box that will have the Terms and Service in it that people can scroll down threw it and read it.

I cant figure out what file i need to edit to add this. I also cant seem to find the right page in the documentation about creating a Text box that you can scroll down threw to read all the text.

Thanks
David

PostPosted: Fri Dec 11, 2009 10:22 am
by shannah
There are a few ways to do this, but here is what I usually do:

1. Add a checkbox field called "agree_to_terms" to the users table. Make this a required field.

2. In the delegate class for the users table, you can implement a block that will display content just before the agree_to_terms field using the
before_agree_to_terms_widget.

e.g.

Code: Select all
function block__before_agree_to_terms_widget(){
     echo '<textarea>'.htmlspecialchars(".... Add your terms and conditions here....").'</textarea>';

}



-Steve

PostPosted: Tue Dec 15, 2009 9:33 am
by zedimus
Hi Steve

Thanks that worked.
Is there a way to make the text area more then 2 lines high, so i can read more then 2 lines at a time?
Also the user can erase the text in the box. i want to lock the text so they cant erase it.

Thanks
David

PostPosted: Tue Dec 15, 2009 9:41 am
by shannah
The textarea tag supports all kinds of goodies including attributes such as
cols
rows
readonly
etc...

-Steve

PostPosted: Tue Dec 15, 2009 1:47 pm
by zedimus
Thanks That worked perfect