Solved thread

This post is marked as solved. If you think the information contained on this thread must be part of the official documentation, please contribute submitting a pull request to its repository.

Does the analogue of $tag->clear() method without using Forms exist?

The Forms has the "clear" method to remove the content of the tag. But how can I do it without Forms?


// For example
$password = new Password('pass', [
    'minlength'   => 2,
    'placeholder' => 'password'

May be, can I do it using Validation or Template (Volt)?


Maybe this could help (if I understand you correctly):

$this->tag->setDefault('password', null);