8000 [Form][FileType] Make 'accept' attribute an option · Issue #14616 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

[Form][FileType] Make 'accept' attribute an option #14616

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

Closed
rvanlaak opened this issue May 12, 2015 · 3 comments
Closed

[Form][FileType] Make 'accept' attribute an option #14616

rvanlaak opened this issue May 12, 2015 · 3 comments
Labels

Comments

@rvanlaak
Copy link
Contributor

Currently the FileType class allows you to set the accept attribute via the attr array:

->add('inputImage', 'file', array(
    ...
    'attr' => array(
        'accept' => 'image/*'
    ),
    ...
))

Given that required and multiple are supported and documented, what about also adding accept to the class as a basic option, and add documentation about it to the cookbook?

http://www.w3.org/TR/2012/WD-html5-20121025/states-of-the-type-attribute.html#attr-input-accept

@inso
Copy link
inso commented May 12, 2015

#6732 (comment)

@jakzal jakzal added the Form label May 12, 2015
@xabbuh
Copy link
Member
xabbuh commented May 12, 2015

👎 for the reasons explained by @Tobion in #6732 (comment)

@rvanlaak
Copy link
Contributor Author

The accept could actually be used in the backend logic right?

👍 for the argument of #6732 , because that's also possible when handled via the attr array.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants
0