Dropdown in list is showing ID instead of label

Status
Not open for further replies.

achartier

Administrator
Staff member
I am sure I have seen this issue before in the forums but I cannot seem to find the answer. I have 2 dropdowns in the list, both populate through eval. On the form they display correctly but in list view one of them shows the id number and not the label. I have looked at all of the settings for the 2 elements and they are identical.

Any ideas?
 
Is this with or without that change I made today with the caching?

If you aren't sure, try commenting out ...

Code:
           if (isset($this->phpOptions[$key]))
            {
                return $this->phpOptions[$key];
            }

... around line 3679 in the element model.

-- hugh
 
Commenting those lines did not change the behavior. If you want to take a look go to the algonquinclub in my sites. From the Club Administration menu choose Signup Configuration. In the backend this is list Signup Configuration and the element is the type.

p.s. this is a production site but the list/form/group/elements for this list are not in production.
 
The 'type' dropdown has no options configured, which is why it isn't able to render the values as labels.

-- hugh
 
The options are in an eval populate. Same as the manager and the manager works fine. Unless I am missing something else.
 
OK, I think I see where the problem is. In my eval populate I check the existing items in the table and don't include the select option if the type has already been chosen. My intent is to allow only one entry per type. I think what is happening is the dropdown is not populated since these types are already used so the list doesn't get the name.

I think the answer is to set the options as disabled.
 
So I have set the option to disabled for these. The list works fine BUT, the options themselves are not being disabled in the select list. The code exists correctly in the element.php file and in dropdown.php in the render function but it isn't getting to the html page. Perhaps you can have a look at that.
 
I found the problem. With the migration to jLayouts the disable option was dropped. I have submitted a PR to correct this.
 
Status
Not open for further replies.
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top