191
coopersita
Re:Make real name a required field for user registration

How do you add more than one required field?

I tried
le="color: #000000"><?php $reg_form->setRequired($lname_text, $name_text, $email_text);


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
le="color: #000000"><?php $reg_form->setRequired($lname_text); $reg_form->setRequired($name_text); $reg_form->setRequired($email_text);


This just breaks the page (blank page)

Any suggestions?

Here's how I added the fields:
le="color: #000000"><?php $name = isset($HTTP_POST_VARS['name']) ? $myts->makeTboxData4PreviewInForm($HTTP_POST_VARS['name']) : ""; $name_text = new XoopsFormText(_US_NAME, "name", 25, 60, $name); $lname = isset($HTTP_POST_VARS['lname']) ? $myts->makeTboxData4PreviewInForm($HTTP_POST_VARS['lname']) : ""; $lname_text = new XoopsFormText(_US_LNAME, "lname", 25, 60, $lname); .... $reg_form->addElement($name_text); $reg_form->addElement($lname_text);



192
coopersita
Re: user details

Hi,

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).




TopTop
« 1 ... 17 18 19 (20)