A
A
Anatoly2015-07-09 19:26:10
Yii
Anatoly, 2015-07-09 19:26:10

active form. How to increase the length of the input field?

Just came to Yii. I confess, but please explain how I can increase the length of small inputs. On pure bootstrap, this is done only by changing the number, but here I can’t understand.
Taking this opportunity, I want to ask a question: "How can I add attributes to these fields, for example: "placeholder".

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Alexey Yukhnovets, 2015-07-09
@Benjamin_Button

<?= $form->field($model, 'field_name')->textInput(['placeholder' => 'Placeholder text']) ?>
Length - css

A
Anatoly, 2015-07-09
@Benjamin_Button

Thank you! Just found a similar solution.

<?= $form->field($model, 'name', [
    'inputOptions' => ['placeholder' => 'Ваше имя']
]); ?>

I will work now with styles.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question