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

adding password field-type to plugin configuration #479

Closed
wants to merge 1 commit into
base: 5.1
from

Conversation

Projects
None yet
4 participants
@teiling88
Copy link
Contributor

teiling88 commented Mar 18, 2016

With this small extension - it is possible to use the config type password instead of text for passwords which are needed for APIs etc.

Here a example of an installation() Menthod:

    public function install()
    {
        $form = $this->Form();
        $form->setElement(
            'text',
            'username',
            array(
                'label' => 'Username',
                'value' => null
            )
        );

        $form->setElement(
            'password',
            'text',
            array(
                'label' => 'Hidden Password',
                'value' => null
            )
        );

        return true;
    }
@shyim

This comment has been minimized.

Copy link
Member

shyim commented Mar 19, 2016

Its already possible, you can define the type in the options :)
Example:

$form->setElement(
            'text',
            'password',
            array(
                'label' => 'Password',
                'value' => null,
                'inputType' => 'password'
            )
        );

@teiling88

This comment has been minimized.

Copy link
Contributor Author

teiling88 commented Mar 19, 2016

Ups - good solution 👍

@teiling88 teiling88 closed this Mar 19, 2016

@bcremer

This comment has been minimized.

Copy link
Contributor

bcremer commented Mar 19, 2016

Thank you @shyim for pointing that out #communityworks 👍

@janbuecker janbuecker added the Declined label Apr 15, 2016

@bcremer

This comment has been minimized.

Copy link
Contributor

bcremer commented May 10, 2016

@teiling88 @shyim

For you information. In the upcoming plugin config, password fields will be supported as first-class citizens

<element type="password">
    <name>password</name>
    <label>Your Password</label>
</element>

👍

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