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.

Phalcon Form

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

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


5.9k
Accepted
answer

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

$forms->has('title');

https://docs.phalconphp.com/en/latest/api/Phalcon_Forms_Form.html