We have moved our forum to GitHub Discussions. For questions about Phalcon v3/v4/v5 you can visit here and for Phalcon v6 here.

How to assign a default value to an input in volt?

I assign the default value to this input and the disabled

{{ text_field("CODIGO", "type" : "numeric") }}

the value we want to provide is "siguiente"

$sql = "select max(s.CODIGO)+1 as nuevocodigo from USUARIO s ";
    $siguiente = $this->db->fetchOne($sql);

You should use Tags

\Phalcon\Tag::setDefault('CODIGO', $siguiente);