inherit
229600
0
Sept 7, 2022 11:09:51 GMT -8
Ben Goodman
96
February 2016
benhun
|
Post by Ben Goodman on May 29, 2017 10:18:34 GMT -8
I would like to show a message, if the given custom field has no value, like:
{foreach $[user.custom_field]}
{if $[user.custom_field.name] == "Example"}
<strong>• $[user.custom_field.name]:<br></strong>
$[user.custom_field.value]<br>
{else} <p>This is a pharagraph</p> {/if}
But since my code checks every value, the pharagraph repeats itself many times. Can anyone give me a quick solution?
|
|
inherit
229600
0
Sept 7, 2022 11:09:51 GMT -8
Ben Goodman
96
February 2016
benhun
|
Post by Ben Goodman on May 30, 2017 21:07:36 GMT -8
Bump
|
|
Kami
Forum Cat
Posts: 40,200
Mini-Profile Theme: Kami's Mini-Profile
#f35f71
156500
0
Offline
Jul 24, 2021 11:48:29 GMT -8
Kami
40,200
July 2010
kamiyakaoru
Kami's Mini-Profile
|
Post by Kami on May 31, 2017 0:04:54 GMT -8
If I recall correctly, you can't. A custom profile field does not appear on the page unless it is filled, so there's no way to check what value it holds or any other aspect of it.
|
|