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

Phalcon Form

How can i verify if a form element exists before render ? does somthing like this exists ? :

if ($form->title){
    $form->render('title')
}


6.9k
Accepted
answer

According to the API Docs for Phalcon\Forms\Form you can call

$forms->has('title');

https://docs.phalcon.io/en/latest/api/Phalcon_Forms_Form.html