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

how to set 'id' value for the phone input ? #28

Open
michaelnguyen2021 opened this issue May 3, 2017 · 1 comment
Open

how to set 'id' value for the phone input ? #28

michaelnguyen2021 opened this issue May 3, 2017 · 1 comment
Assignees

Comments

@michaelnguyen2021
Copy link

I tried lot of things to set id attribute for phone input HTML tag but none of them work

<?= $form->field($parent, 'primary_phone', ['options' => ['class' => 'col-md-4'], 'selectors' => ['input' => '#parent1-primary-phone']])
->widget(PhoneInput::className(['id' => 'test']), [
    'jsOptions' => [
        'allowExtensions' => true,
        'preferredCountries' => ['ca', 'lb'],
        'nationalMode' => false
    ],
    'defaultOptions' => [
        'class' => 'form-control1',
        'id' => 'test'
    ]
]); ?>

Did I miss something ?

@Borales Borales self-assigned this May 3, 2017
@Borales
Copy link
Owner

Borales commented Jun 10, 2017

@michaelnguyen547 try like this

$parent, 'primary_phone', ['options' => ['class' => 'col-md-4', 'id' => 'myID']

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

No branches or pull requests

2 participants