- Posts: 69
COMMUNITY FORUM
Hide empty extra field & li
- Justin Place
- Topic Author
- Offline
- Senior Member
Less
More
10 years 8 months ago - 10 years 8 months ago #124358
by Justin Place
Hide empty extra field & li was created by Justin Place
Hi there,
i would like to hide a extra field if empty but also hide the li element as well,
please if anyone can assist i would appreciate it,
thanks, my extra field code is as follows:
i would like to hide a extra field if empty but also hide the li element as well,
please if anyone can assist i would appreciate it,
thanks, my extra field code is as follows:
Log in or Create an account to join the conversation.
- Lefteris
- Offline
- Moderator
Less
More
- Posts: 8743
10 years 8 months ago - 10 years 8 months ago #124359
by Lefteris
JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
Replied by Lefteris on topic Re: Hide empty extra field & li
You can try to make a check for each of your extra fields this:
<?php if (isset($this->item->extraFields->contact->value)): ?>
<li><b><?php echo $this->item->extraFields->contact->name; ?></b>
<?php echo $this->item->extraFields->contact->value ;?></li>
<?php endif; ?>
JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
Please Log in or Create an account to join the conversation.
- Justin Place
- Topic Author
- Offline
- Senior Member
Less
More
- Posts: 69
10 years 8 months ago #124360
by Justin Place
Replied by Justin Place on topic Re: Hide empty extra field & li
Thank you!!
Resolved
Resolved
Please Log in or Create an account to join the conversation.
- Yiota
- Visitor
10 years 8 months ago #124361
by Yiota
Replied by Yiota on topic Re: Hide empty extra field & li
You are welcome.
Please Log in or Create an account to join the conversation.