Re:Make real name a required field for user registration

How do you add more than one required field?

I tried

But it only makes the first one ($lname_text) required, the others are not. Email sort of works because once you submit it checks it for formatting, but name won't work at all.

I also tried

This just breaks the page (blank page)

Any suggestions?

Here's how I added the fields:
$name = isset($HTTP_POST_VARS['name']) ? $myts->makeTboxData4PreviewInForm($HTTP_POST_VARS['name']) : "";
$name_text = new XoopsFormText(_US_NAME"name"2560$name); 
$lname = isset($HTTP_POST_VARS['lname']) ? $myts->makeTboxData4PreviewInForm($HTTP_POST_VARS['lname']) : "";
$lname_text = new XoopsFormText(_US_LNAME"lname"2560$lname);

Re: user details


I tried to do just that yesterday, and so far seems to work fine:

1. First I changed the existing user database. I just added the necessary rows to match my needs (I guess you can make a whole new table if you wanted).
2. Then I changed the following files: register.php, include/registerform.php, and kernel/user.php (Depending on what you want to do, you need to add or delete code).

I've managed to change the writing to the database process, but haven't tried the retrieving from the database part. It should be easier...

Just remember to BACKUP ORIGINAL FILES before you try to hack them. Especially since you say you don't know much php.

Hope this helps (at least will give you an idea about where to start), but don't blame me if it doesn't (I'm new to XOOPS myself, and hadn't had change to thoroughly test what I did yesterday).

« 1 ... 17 18 19 (20)


Who's Online

97 user(s) are online (68 user(s) are browsing Support Forums)

Members: 0

Guests: 97



Goal: $100.00
Due Date: Jun 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits