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

custom textarea ID #1

Open
drSun opened this issue Mar 26, 2016 · 0 comments
Open

custom textarea ID #1

drSun opened this issue Mar 26, 2016 · 0 comments

Comments

@drSun
Copy link

drSun commented Mar 26, 2016

Hi! Thank you for your work.

It's not possible to have multiple editors on page for one model, because you generate ID manually. For example, I've got ten $form->field($model, 'description') for model Block, and every such item has ID == block-description, so just the first one has murkitup editor, others are the simple textareas.

Please, wirte something like this:

if (!empty($this->options['id'])) {
    ; // do nothing
} elseif ($this->hasModel()) {
    $this->options['id'] = Html::getInputId($this->model, $this->attribute);
} else {
    $this->options['id'] = $this->getId();
}
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

1 participant