Subject:*
<
Name/Email:*
<
Message Icon:*
<
Select*
<
Message:*
<



Click the Preview to see the content in action.
Options:*
<
Confirmation Code*
<
4 + 8 = ?  
Input the result from the expression
Maximum attempts you can try: 10
*
<
     

Re: Manditory fields for user registration?
by Anonymous on 2008/5/29 0:10:03

use smartprofile module or you need to hack register.php file.

For example: How to make Name field as required ?

Edit register.php then add:
le="color: #000000"><?php $name = isset($_POST['name']) ? $myts->stripSlashesGPC($_POST['name']) : '';

before:
le="color: #000000"><?php $uname = isset($_POST['uname']) ? $myts->stripSlashesGPC($_POST['uname']) : '';

and add:
le="color: #000000"><?php <input type='hidden' name='name' value='".$myts->htmlSpecialChars($name) ."' />

before:
le="color: #000000"><?php <input type='hidden' name='uname' value='".$myts->htmlSpecialChars($uname)."' />

and add:
le="color: #000000"><?php $newuser->setVar('name', $name, true);

before:
le="color: #000000"><?php $newuser->setVar('uname', $uname, true);


Now edit include/registerform.php then add:
le="color: #000000"><?php $reg_form->addElement(new XoopsFormText(_US_REALNAME, 'name', 30, 60, $myts->htmlSpecialChars($name)), true);

before:
le="color: #000000"><?php $uname_size = $xoopsConfigUser['maxuname'] < 25 ? $xoopsConfigUser['maxuname'] : 25;


That's it!

This hack based on autologin hack and working on 2.0.18.1 or older.
Manditory fields for user registration?
by antifmradio on 2008/5/28 23:09:17

Wanted to know if there is a way to make some of the fields MANDITORY for user registrations.

Who's Online

209 user(s) are online (157 user(s) are browsing Support Forums)


Members: 0


Guests: 209


more...

Donat-O-Meter

Stats
Goal: $15.00
Due Date: Jul 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $15.00
Make donations with PayPal!

Latest GitHub Commits