Answer the question
In order to leave comments, you need to log in
How to remove html tags in Yii2?
<?= $form->field($model, 'LastName')->textInput()
strip_tags() doesn't help
with options field encode => true also
HTMLPurifier
Nothing helped.
I have a form, the user enters data, I need to remove all tags before submitting. Maybe I'm not right there?!
Answer the question
In order to leave comments, you need to log in
strip_tags() doesn't help
<?php $model->LastName = strip_tags($model->LastName); ?>
<?= $form->field($model, 'LastName')->textInput(); ?>
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question