hide empty elements in details

Empty elements have the CSS class
fabrikDataEmpty added and I think this set set to display:none (e.g. element is hidden) in the bootstrap details template per default.
 
I tried bootstrap which looked the same as "use default" and bootstrap tabs and it didn't hide empty elements, see pic
 

Attachments

  • empty.png
    empty.png
    10.9 KB · Views: 165
The class is set.
But it seems it's not in bootstrap_tabs, so add a custom_css.php (copy and rename custom_css_example.php) with
#$form .fabrikDataEmpty {
display: none;
}
 
Thanks!
But this brings up another question. How can I make "please select" values empty? or hide them otherwise?
 
I should make this a little more clear. I have drop down elements with a "please select" value. these dropdowns won't disappear like the others.
I tried to leave the value of "please select" empty but then I can't save the element.
Any ideas?
 
Hmmm. That's happening because technically, those elements aren't "empty". They have a potentially selectable value.

I'll have a look at the code, see if there's way of working round that.

Are these 'dropdown' elements, or join elements set to dropdown with the "please select" option enabled?

-- hugh
 
hmm I didn't work. If you log in the frontend of my site, you can check it here
/index.php/fahrten/details/3/361
On the second tab, there is a dropdown element "Gewicht in" which shouldn't be visible
 
in
public function dataConsideredEmpty($data, $repeatCounter)
$data contains the label, not the value
Maybe something like replaceLabelWithValue() is missing?
 
PS ... best thing would be to add YAFO so folk can specify what value(s) should be considered "empty", which just defaults to 0. But for now ... 0 and -1 it is.

-- hugh
 
Yup, I saw that comment, and responded to it.

So you are saying it works on the parent element, but not on the linked copy of that that element on a copy of the form?

What's the link to that copy of the form?

-- hugh
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top