Yes/No element displaying as an icon in list?

emcguire

Member
Hi!

I have a Yes/No element in my form. I have it set to Show in List. however, in the list, for some reason, it shows up as an icon no matter what the selection is. I have attached a screenshot.

I tried setting the element to "Single Yes" - no change. and "replace with Icons" is set to NO in the list options.

Should I just convert this to a standard radiobutton? Not sure why its doing that. I do like the styling of the Yes/No element.
 

Attachments

  • View Promo Forms.png
    View Promo Forms.png
    28.7 KB · Views: 237
Fabrik is displaying checkmark/delete icons in list view (it depends on your Joomla template which icon is rendered then).
You can override this behaviour
http://fabrikar.com/forums/index.php?wiki/jlayouts/
(copy
plugins\fabrik_element\yesno\layouts/fabrik_element_yesno_list.php to
components/com_fabrik/views/list/tmpl/your-template/layouts/fabrik_element_yesno_list.php
and modify)
 
Or if you need to change the behavior for all lists, not just one template, copy it to ...

./templates/<your site template>/html/layouts/com_fabrik/fabrik_element_yes_no.php

It's weird that you template is showing a wineglass icon. We use the fairly standard 'checkmark' and 'remove' icon names. I'd be interested in seeing the affected page on your site, so I can work out why it is rendering one of those as a wineglass! And we'll need to figure out what icon you need in order to override it.

-- hugh
 
Thanks Guys,

I tried all that above and nothing worked. what I ended up doing that worked was I just changed the value of the icon file/class on the fabrik_element_yesno_list.php and fabrik_element_yesno_details.php files

PHP:
if ($data == '1') :
    $icon = $j3 && $format != 'pdf' ? 'check.png' : '1.png';
    $properties['alt'] = FText::_('JYES');

    echo FabrikHelperHTML::image($icon, 'list', $tmpl, $properties, false, $opts);
else :
    $icon = $j3 && $format != 'pdf' ? 'remove-circle.png' : '0.png';
    $properties['alt'] = FText::_('JNO');

wierd. not sure how/why that worked but it did. instead of checkmark, I set it to "check" and instead of delete or whatever it was(can't remember what it was originally), I changed it to "remove-circle". I came to that conclusion by looking at the inspector and seeing what css file it was getting the icon class from and went to that css file (the template bootstrap-default.css) and picked out the 2 icon classes that I wanted to display. now it looks like the screenshot. whatever was the default values in those files - those icons didnt exist in my css, so it must have just put the wine glass there for some reason. If you still want to see the page, I can create a temp cred for you(it is not public facing)

I did the same thing on the "details" element. The template I'm using is Shape5 Vertex.

Thanks for the help again fellas.
 

Attachments

  • View Promo Forms.png
    View Promo Forms.png
    15.8 KB · Views: 158
Ah hah, the yesno element never got updated to use the generic getLayout() that adds those override paths.

Fixing that now.

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

Thank you.

Members online

Back
Top