PDA

View Full Version : How To Make AIM Mandatory??


Heineken77
07-14-2002, 12:13 AM
Hi,

How do I make the profile field AOL Instant Messenger Handle: mandatory? I went to User Profile Fields > Edit however the only fields available to me to edit are the following:

Biography
Location
Interests
Occupation

I don't want to add another AOL Instant Messenger Handle field as that would probably make that field double up in the signup form as it's already there :(

Any ideas? :)

Thanks!
Heineken77

Logician
07-14-2002, 09:27 AM
Create a new template named "error_requiredfieldaim", specify your error message when some left it blank then add this code in register.php and member.php:


$aim = trim($aim);
if (!$aim) {eval("standarderror(\"".gettemplate("error_requiredfieldaim")."\");");}

just before :
// ENTER ANY CUSTOM FIELD VALIDATION HERE!

Heineken77
07-14-2002, 09:34 AM
Thanks bro :) So will this also move the AIM screen name field up into the required fields, or will this field still be shown in the optional fields? Just dont' want to confuse the memebers :)

Thanks!
Heineken

Logician
07-14-2002, 09:46 AM
oh sorry this will not change the location of aim form field.. however it will just display the error message in the template "error_requiredfieldaim" if someone left it blank..

Heineken77
07-14-2002, 09:48 AM
Is there any way of moving the location of the AIM field up to the required fields? I followed your instructions and the error message came up exactly how I like it :) All I need to do now is figure out how to move the AIM Field up to the required fields section and I'm set!

Thanks :)

Heineken

Heineken77
07-14-2002, 06:26 PM
Any luck on how to move the AIM field up into the required fields section anyone? :) Also, I followed Logician's instructions as stated up in this thread in order to display an error message if they do not fill out the AIM field. Will I have to make any changes to that if I move the field up into the required fields section of the signup form if anyone knows how to do it?

Thanks!
Heineken :)

scsa20
07-15-2002, 05:28 PM
it's easy, just go thru. the register templates and the user info (or whatever) template and search for AIM and copy that line and paste it whereever the required fields section is ;)

Heineken77
07-16-2002, 02:13 PM
hehe .. sweet thanks ;)

Heineken77
07-16-2002, 02:15 PM
Hey Logician :)

Think you can show me what to modify in order to make the birthday field mandatory as well?

$aim = trim($aim);
if (!$aim) {eval("standarderror(\"".gettemplate("error_requiredfieldaim")."\");");}

do I just change wherever it says $aim to $birthday and change the name of the template?

Thanks! :)
Heineken

scsa20
07-16-2002, 07:13 PM
yep, that's correct ;)