View Full Version : If / Then Profile Field?
Savage702
09-26-2008, 03:45 PM
Is there a way to make a profile field be present depending on how another profile field is entered?
Example, my forum is real name based. If they select that they are female, then there should be an option to enter their Maiden name. If they select Male, then that option isn't there.
Is there anything like that already done?
Thanks,
Mark
Savage702
10-10-2008, 01:46 PM
Bump... I don't see anything, but I could be searching the wrong keywords?
Lynne
10-10-2008, 02:50 PM
If you create a profile field in the admin cp, those profile fields will be present for everyone to fill out. However, what you do with those fields is up to you. If a guy fills out the Maiden Name field, just don't display it.
Savage702
10-13-2008, 11:09 AM
If you create a profile field in the admin cp, those profile fields will be present for everyone to fill out. However, what you do with those fields is up to you. If a guy fills out the Maiden Name field, just don't display it.
Well yeah, but there's nothing in place to say "if male, don't display result"... which is ultimately what I'm after. Probably wishful thinking though. ;-)
Lynne
10-13-2008, 05:29 PM
Well yeah, but there's nothing in place to say "if male, don't display result"... which is ultimately what I'm after. Probably wishful thinking though. ;-)
Except you do have that. Didn't you say you have a field asking if they are male or female? So, you use that in your condition...
Say your male/female field is field10 and your maiden name one is field11, then you could do something like:
<if condition="$post[field10] == 'Female'">
Maiden Name: $post[field11]
</if>
Savage702
10-14-2008, 11:31 AM
Except you do have that. Didn't you say you have a field asking if they are male or female? So, you use that in your condition...
Say your male/female field is field10 and your maiden name one is field11, then you could do something like:
<if condition="$post[field10] == 'Female'">
Maiden Name: $post[field11]
</if>
Oh snap! :eek: (as my 8 year old says!! :rolleyes: ) Think OUTSIDE the box Mark... outside the box!
Thanks Lynne!
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.