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

Comments

Projects
2 participants
@scrnjakovic
Copy link
Contributor

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 niden added this to To do in 4.0 Release via automation Dec 25, 2018

@niden

This comment has been minimized.

Copy link
Member

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 Feb 23, 2019

4.0 Release automation moved this from To do to Done Feb 23, 2019

@niden niden reopened this Apr 16, 2019

4.0 Release automation moved this from Done to In progress Apr 16, 2019

@niden

This comment has been minimized.

Copy link
Member

commented Apr 16, 2019

cc @emiliodeg

@emiliodeg emiliodeg referenced this issue Apr 26, 2019

Closed

Form Attributes #13646 #14019

2 of 4 tasks complete
@niden

This comment has been minimized.

Copy link
Member

commented May 16, 2019

Resolved in #14082

@niden niden closed this May 16, 2019

4.0 Release automation moved this from In progress to Done May 16, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.