V
V
Vitaly2017-04-10 12:41:52
Yii
Vitaly, 2017-04-10 12:41:52

Get the name attribute of a textarea?

Good afternoon.
I connect the text editor plugin, but in order to write to the database, it is necessary that the textarea that is displayed by default along with this editor takes the name, as for example it happens if you just display the textarea.
The question is how to get the name. Maybe there is something like this just for the name

if (!array_key_exists('id', $options)) {
            $inputId = $options['id'] = static::getInputId();
        }

Plugin generated text area
<textarea id="w2" style="visibility: hidden; display: none;"></textarea>

And just a textarea rendered with an ActiveField
<textarea id="contents-brief_body" class="form-control" name="Contents[brief_body]">&lt;p&gt;tetst&lt;/p&gt;
</textarea>

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Mi7teR, 2017-04-10
@Mi7teR

what editor and plugin do you use, if not a secret?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question