Let's say I have this:
How do I set a default value, e.g 1?
The default value is taken from the related entity:
public function $telephone = '+44 123-456-789';
$form = new Form(new Contact());
Thanks, that works.
I guess you meant "public $telephone" and not "public function $telephone"
@BlueShark Phalcon first checks 'getTelephone' function, than public property 'telepone' if first doesn't exist.
From Phalcon 1.1.0 you can set default value by $formElement->setDefault($value); (without using entity)