The Arcive of vBulletin Modifications Site. |
|
|
#1
|
||||
|
||||
|
I have added conditionals that display some new profile fields in my postbit_legacy template. The problem I am having is making these fields show up when the member has not yet added any info. I know this should be easy but I am doing something wrong.
I need the field to show up so members know they can add their info. Thanks, Rich |
|
#2
|
||||
|
||||
|
What is the code you are currently using?
|
|
#3
|
||||
|
||||
|
Thanks, right now just the basic conditional
PHP Code:
|
|
#4
|
||||
|
||||
|
Try something like this:
Code:
<vb:if condition="$post['field7'] != ''">
<dt>Height</dt> <dd>{vb:raw post.field7}</dd>
<vb:else />
<dt>Edit Your Profile to fill in information</dt>
</vb:if>
|
|
#5
|
||||
|
||||
|
I actually tried something like that but I did not add text. I may have messed up though,
I will try this, Thanks Ozzy! #Update - ok, I see what I did before. In the else statement I put ___ thinking it would show Height___ if the info was not added. I should have just put Height in the text field. Doh Thanks again |
|
#6
|
||||
|
||||
|
No problem, glad it's working now.
|
|
#7
|
||||
|
||||
|
I had it working but alignment was messed up. I have a few fields I want members to see so they know they can enter their info. I may need to do a little more work to get it to display properly.
|
|
#8
|
||||
|
||||
|
What is the alignment issue? Perhaps a link so I can see what you got going on live.
|
|
#9
|
||||
|
||||
|
Sure,
![]() when filled it looks like this ![]() I don't have a link because I put the standard conditional back while i figure it out. |
|
#10
|
||||
|
||||
|
Here ya go:
Code:
<vb:if condition="$post['field7'] != ''">
<dt>Height</dt> <dd>{vb:raw post.field7}</dd>
<vb:else />
<dt style="padding-left:10px;">Height</dt>
</vb:if>
|
![]() |
|
|
| X vBulletin 3.8.12 by vBS Debug Information | |
|---|---|
|
|
More Information |
|
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|