Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[NFR] Forms should also have attributes #13646

Closed
scrnjakovic opened this issue Dec 9, 2018 · 3 comments
Closed

[NFR] Forms should also have attributes #13646

scrnjakovic opened this issue Dec 9, 2018 · 3 comments
Labels
new feature request Planned Feature or New Feature Request

Comments

@scrnjakovic
Copy link
Contributor

scrnjakovic commented Dec 9, 2018

I suggest implementing attributes collection for Phalcon\Forms\Form. Like other HTML tags/elements, <form> has attributes as well so I don't see why we shouldn't support that?

$form->setAttribute('data-field', 'myValue');

How would we use it?
I know there is a difference between elements and the form as you render elements with the help of the form and you render form with the help of the Phalcon\Tag but it would still be helpful to be able to set attributes outside of the view.

{{  form('action', myForm.getAttributes()) }}
{# or #}
{{  form(myForm) }}
{# or #}
{{ myForm.renderSelf() }}
@niden
Copy link
Member

niden commented Feb 23, 2019

Closing in favor of #13855. Will revisit if the community votes for it, or in later versions.

@niden niden closed this as completed Feb 23, 2019
@niden niden reopened this Apr 16, 2019
@niden
Copy link
Member

niden commented Apr 16, 2019

cc @emiliodeg

@emiliodeg emiliodeg mentioned this issue Apr 26, 2019
4 tasks
@niden niden added enhancement Enhancement to the framework new feature request Planned Feature or New Feature Request and removed enhancement Enhancement to the framework labels May 16, 2019
@niden
Copy link
Member

niden commented May 16, 2019

Resolved in #14082

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new feature request Planned Feature or New Feature Request
Projects
None yet
Development

No branches or pull requests

2 participants