1. NOTICE: If you are using Fabrik and update to Joomla 3.10, you will need to update to Fabrik 3.10. And, if you are using Fabrik, do not upgrade to Joomla 4, we do not have a supported version ready for release. More information on a release date coming soon. Also, please note that Fabrik 3.10 will not install on any Joomla sites less than 3.8.
    Dismiss Notice

would like to show $row->text in eval'd element list view

Discussion in 'Community' started by usdc-or, Oct 14, 2021.

  1. usdc-or

    usdc-or Member

    Level: Community
    I have several forms that use eval'd php code to create options for radio button and checkbox elements. I see in the list view these are showing the id rather than the value, no doubt because that is what was saved in the database.

    from the standard example:

    foreach ($rows as $row) {
    $options[] = JHTML::_('select.option', $row->id, $row->text);
    }
    return $options;


    Shows the $row->text in the form but in list view the $row->id is displayed. Any assistance is appreciated.

    I feel like this used to work before 3.10 but I cannot be absolutely certain.
     
  2. troester

    troester Well-Known Member Staff Member

    Level: Community
    Should do.
    If you have existing records with a value in DB which is not one of your option values it will show this value (because it doesn't find a label for it).
     

Share This Page