[SOLVED] Hide load module field if empty

More
8 years 6 months ago - 8 years 5 months ago #62553 by id-pop
Hello,
When I create a "load module" field", it is displayed even when there is no result (it is a flexicontent universal module). What can I do to hide it when empty (like every other field type) ?
Thanks a lot !
Alexandre
Last edit: 8 years 5 months ago by ggppdk.

Please Log in or Create an account to join the conversation.

More
8 years 6 months ago #62704 by ggppdk
Hello

- what should be hidden ? you mean that the field label is display when module returns empty ?
- does the load-module return no HTML or do they return something like an empty div: "<div></div>" ?


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star...

Please Log in or Create an account to join the conversation.

More
8 years 5 months ago #63072 by id-pop
When the module is empty : it still displays the flexi label and flexi value spans. For other fields, when it's empty, none of those span is displayed. That's what I want.

Please Log in or Create an account to join the conversation.

More
8 years 5 months ago #63083 by ggppdk
Which module is it ?

have you test with other modules ?


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star...

Please Log in or Create an account to join the conversation.

More
8 years 5 months ago - 8 years 5 months ago #63084 by ggppdk
Hello

you can test this:
edit the plugin file
plugins/flexicontent_fields/fcloadmodule/fcloadmodule.php

Find line:
Code:
$field->{$prop} = $display;

and above it add:
Code:
$display = trim($display);


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star...
Last edit: 8 years 5 months ago by ggppdk.

Please Log in or Create an account to join the conversation.

More
8 years 5 months ago - 8 years 5 months ago #63089 by ggppdk
Hello

please note that for universal module you also need to enable parameter:

"Hide label if empty" inside the "Select fields" TABs (at the bottom, "Custom fields" section)


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star...
Last edit: 8 years 5 months ago by ggppdk.
The following user(s) said Thank You: id-pop

Please Log in or Create an account to join the conversation.

Moderators: vistamediajoomlacornerggppdk
Time to create page: 0.642 seconds
Save
Cookies user preferences
We use cookies to ensure you to get the best experience on our website. If you decline the use of cookies, this website may not function as expected.
Accept all
Decline all
Essential
These cookies are needed to make the website work correctly. You can not disable them.
Display
Accept
Analytics
Tools used to analyze the data to measure the effectiveness of a website and to understand how it works.
Google Analytics
Accept
Decline