2

To elaborate: The component's configuration is supposed to show a field where i choose which usergroup gets access to a certain view. The fieldtype used is 'usergrouplist'. I've also tried 'usergroups' previously(only to end up at the same result).

I've check the same thing is there in com_users but it shows a label while mine doesn't.

How do I get this field to show a label?

The code:

<fieldset
    name="permissions"
    label="COM_PLACEHOLDER_DICTIONARY_PERMISSIONS"
    description="COM_PLACEHOLDER_CONFIG_DESC_PERMS"
>
    <field name="view_access" type="usergrouplist"
        label="COM_PLACEHOLDER_CONFIG_VIEWACCESS_LABEL"
        description="COM_PLACEHOLDER_CONFIG_VIEWACCESS_DESC"
        default="1" checksuperusergroup="1"/>
</fieldset>

Notice how it doesn't show a 'Label' for the field.

Notice how the 'label' part of the field isn't there

2 Answers 2

1

The problem is likely in your view. What do you get when you print something like the following in your view?

<?php echo $this->form->getLabel('view_access'); ?>
1

It worked after I uninstalled and reinstalled the component. So apparently there's nothing wrong with the code.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.