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

Desctiption for \Phalcon\Forms\Element\* consturtor parameters

Where I can find a full list of options for $attributes parameter in Elements constructor? How I can define a "value" attribute for \Phalcon\Forms\Element\Submit? 'title', 'value', 'text' and 'label' doesn't work.



98.9k

Attributes is a list of HTML attributes: https://www.w3.org/TR/html4/index/attributes.html that are passed to Phalcon\Tag helpers

I can't change the 'value' in Submit :(

The code

$submit = new Submit('submit', [
    'class' => 'myclass',
    'value' => 'My label',
]);

and

{{ form.render('submit') }}

outputs

<input type="submit" class="myclass" value="submit" />


98.9k

The name of the submit is beign used as value, let me add an option for add...

Yes, it will be great ;-)

Nothing changed? I think that current behavior is not very useful.