PDA

View Full Version : How Do I Call A Field?


Hex_legend
12-31-2007, 08:16 PM
How do you call a field to show on the profile from what they entered on their edit details page?

Zaiaku
12-31-2007, 08:25 PM
Use this:
<if condition="$post['fieldXX']">$post[fieldXX]</if>

Replace XX with the profile field number

Hex_legend
12-31-2007, 08:30 PM
I have put that into the script and nothing is working.

www.projekttalk.com/index.php

user - test
Pass - test


Anyone?


I am using Field 2, which has the Location inside.

Zaiaku
12-31-2007, 08:33 PM
Sorry for not being more precise. That the code you use in a template.

Use code:
<if condition="$post['field2']">$post[field2]</if>

Hex_legend
12-31-2007, 08:36 PM
Thanks Zaiaku,

I understand what you meant on the first post and I did replace the X's with field2, but it's just not pulling the data.

This is VB3.7 (Beta 3) in the Memberinfo template

Zaiaku
12-31-2007, 08:40 PM
Sorry my mistake I was thinking postbit not memberinfo

<if condition="$userinfo[field13]">$userinfo[field2]</if>

Hex_legend
12-31-2007, 08:42 PM
Does the first Field13 need to be changed to 2 as well?

Zaiaku
12-31-2007, 08:47 PM
Yes sorry about that.

Hex_legend
12-31-2007, 08:49 PM
You are a star, worked a treat!

One last question regarding this...

How do I do it so that if no data is entered, it will say "No information"

Zaiaku
12-31-2007, 08:55 PM
Use this:
<if condition="$userinfo[field2]">$userinfo[field2]<else />No Infomation</if>

MoT3rror
12-31-2007, 08:56 PM
<if condition="$userinfo[field2]">$userinfo[field2] <else /> No Information</if>