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

Input form types are doubled #824

Closed
smolak opened this issue Jul 11, 2013 · 3 comments
Closed

Input form types are doubled #824

smolak opened this issue Jul 11, 2013 · 3 comments
Labels
not a bug Reported issue is not a bug

Comments

@smolak
Copy link

smolak commented Jul 11, 2013

Hi!

When generating form input fields using \Phalcon\Tag, 'type' is being doubled:

tag->textField(array('foo', 'type' => 'number')); ?>

Produces:

And should:

@phalcon
Copy link
Collaborator

phalcon commented Jul 11, 2013

Tag::textField is only intended to produce standard text fields, you can use Tag::numericField for numeric fields

@smolak
Copy link
Author

smolak commented Jul 11, 2013

Shouldn't then 'type' key be ommited? Or better yet, it should pass a new type, overwriting the current one. All of those fields (http://www.w3schools.com/html/html5_form_input_types.asp) are text fields. As for checkbox or radio, maybe it should throw an exception with a hint how to produce checkbox/radio field properly?

Sorry for not properly formating my first post, I was pointing there that it produces

<input type="text" type="number" id="foo" name="foo" >

instead of

<input type="number" id="foo" name="foo" >

as a result of overwriting the current type.

@phalcon
Copy link
Collaborator

phalcon commented Oct 2, 2013

Closing since it's not a bug

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
not a bug Reported issue is not a bug
Projects
None yet
Development

No branches or pull requests

1 participant