<?php $form = ActiveForm::begin(); ?>
<?= $form->field($model, 'description')->textarea(['rows'=>20,'columns'=>100,'maxlength' => 4000]) ?>
<div class="form-group">
<?= Html::submitButton($model->isNewRecord ? Yii::t('app', 'Add') : Yii::t('app', 'Update'), ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']) ?>
</div>
<?php ActiveForm::end(); ?>
this is my view. if i run the code and try to insert a value in the form field ‘description’ in my local language like this (വിനീത്) the value that gets stored is " ?? ". how can i store the value as (വിനീത്) itself and display it in the view.
l i tried like this in my view to make my form to accept other languages
<div class="synopsis-form col-md-5">
<h2><?= Html::encode($this->title) ?></h2>
<?php $form = ActiveForm::begin( [
'method' => 'post',
'id' => 'add-fanclub',
'accept-charset'=>'UTF-8'
] );?>
<?= $form->field($model, 'description')->textarea(['rows'=>10,'maxlength' => 1000]) ?>
<div class="form-group">
<?= Html::submitButton($model->isNewRecord ? Yii::t('app', 'Create') : Yii::t('app', 'Update'), ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']) ?>
</div>
<?php ActiveForm::end(); ?>
</div>
but i got a error like this Setting unknown property: yii\widgets\ActiveForm::accept-charset
my main-local.php in common/config (yii2 advanced app)is as follows
'components' => [
'db' => [
'class' => 'yii\db\Connection',
'dsn' => 'mysql:host=localhost;dbname=user_urshow',
'username' => 'user',
'password' => 'user',
'charset' => 'utf8',
],
what am i missing?