- Posts: 15920
COMMUNITY FORUM
if else on extrafield
- Krikor Boghossian
- Offline
- Platinum Member
<?php if ($extraField->id == 1): ?>
<?php if ( $extraField->value != '' && $extraField->value != ' ' && !empty($extraField->value) ): ?>
<?php endif; ?>
<?php else: ?>
Do something
<?php endif; ?>
Let's see if this does the trick.
JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
Please Log in or Create an account to join the conversation.
- John-Eilif Eliassen
- Topic Author
- Offline
- Senior Member
- Posts: 40
Please Log in or Create an account to join the conversation.
- Krikor Boghossian
- Offline
- Platinum Member
- Posts: 15920
However, I am against animal cruelty so... is it possible to see a screenshot of these extrafields?
I would also like a screenshot of the database cell.
It is possible that these fields DO hold some value (whitespace).
JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
Please Log in or Create an account to join the conversation.
- John-Eilif Eliassen
- Topic Author
- Offline
- Senior Member
- Posts: 40
Krikor wrote: At this moment I think sacrificing some poultry might be a reasonable choice.
However, I am against animal cruelty so... is it possible to see a screenshot of these extrafields?
I would also like a screenshot of the database cell.
It is possible that these fields DO hold some value (whitespace).
It is weird, right. And ot, I too am against animal cruelty.
I will provide a snippet of the database asap. I changed the extrafield from being a LINK type to being a textfield. So the ID of the field is now naturally 2.
This is the extrafield i added and viewed from additem page.
imgur.com/PPQlIRv
imgur.com/9gQro7a
Module setting
imgur.com/sfv83nd
Category setting
imgur.com/xruNvPT
I am not competent enough to solve this by myself as i've tried everything i found by searching this forum and the web in general, so I truly and genuinely appreciate your effort Krikor!
OT: Do you know the difference between a blonde and a mosquito?
Please Log in or Create an account to join the conversation.
- John-Eilif Eliassen
- Topic Author
- Offline
- Senior Member
- Posts: 40
ID | Name | Value | Type | Group | Published | Ordering |
2 | KS | {"name":null,"value":"","target":null,"alias":"KS","required":0,"showNull":0} | textfield | 1 | 1 | 2 |
Please Log in or Create an account to join the conversation.
- Krikor Boghossian
- Offline
- Platinum Member
- Posts: 15920
I have to point a couple of issues.
a) Backup and update to K2 2.7 or K2 2.7.1 DEV - github.com/getk2/k2
b) Can you try with a newly created extrafield?
JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
Please Log in or Create an account to join the conversation.
- John-Eilif Eliassen
- Topic Author
- Offline
- Senior Member
- Posts: 40
Krikor wrote: I would love to know the difference.
I have to point a couple of issues.
a) Backup and update to K2 2.7 or K2 2.7.1 DEV - github.com/getk2/k2
b) Can you try with a newly created extrafield?
I tried with a newly created field, did nothing to the behaviour.
Updates when upgraded.
You dont smack the blonde when the sucking starts.
Please Log in or Create an account to join the conversation.
- Krikor Boghossian
- Offline
- Platinum Member
- Posts: 15920
JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
Please Log in or Create an account to join the conversation.