Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

getFieldHelp support for multiple inputs block type #41

Open
luya-bot opened this issue Feb 16, 2018 · 1 comment
Open

getFieldHelp support for multiple inputs block type #41

luya-bot opened this issue Feb 16, 2018 · 1 comment
Assignees

Comments

@luya-bot
Copy link

This issue has originally been reported by @adipriyantobpn at luyadev/luya#1769.
Moved here by @nadar.


Have CMS Block with zaa-multiple-inputs type, which contains 2 fields or more, like this:

public function config()
{
    return [
        'vars' => [
            ['var' => 'features', 'label' => "Features", 'type' => 'zaa-multiple-inputs', 'options' => [
                ['var' => 'icon', 'label' => 'Icon', 'type' => 'zaa-select', 'options' => [...]],
                ['var' => 'title', 'label' => 'Title', 'type' => 'zaa-text'],
                ['var' => 'text', 'label' => 'Text', 'type' => 'zaa-wysiwyg'],
                ['var' => 'bgColor', 'label' => 'Bg. Color', 'type' => 'zaa-select', 'options' => [...]],
            ],
        ],
    ];
}

It would be nice if getFieldHelp() function can render help for each field inside zaa-multiple-inputs, too.

Structured array like this will be suffice.

public function getFieldHelp()
{
    return [
        'features' => [
            'icon' => 'Icon name, will be shown at the top of the each feature',
            'title' => 'Title of the feature',
            'text' => 'Some explaination',
            'bgColor' => 'Background color for feature box',
        ],
    ];
}
@hbugdoll
Copy link
Member

For block fields, the help button is added to the corresponding zaa-directive by the CMS module.
zaa-directives themselves haven't any help button.

zaa-multiple-inputs is defined by the Admin module. Adding help buttons there seems not consistent.

Which strategy could be used?
Should prospectively zaa-directives have a help button by default?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants