Skip to content

[Form] Added the 'range' FormType #12067

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
wants to merge 4 commits into from
Closed

[Form] Added the 'range' FormType #12067

wants to merge 4 commits into from

Conversation

jaytaph
Copy link
Contributor

@jaytaph jaytaph commented Sep 27, 2014

Q A
Bug fix? no
New feature? yes
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets #11979
License MIT
Doc PR

Implemented the "range" FormType.

@@ -1105,3 +1105,4 @@ Symfony2 is the result of the work of many people who made the code better
- Erik Saunier (snickers)
- Matej Žilák (teo_sk)
- Vladislav Vlastovskiy (vlastv)
- Joshua Thijssen (jaytaph)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is auto-generated

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was not sure. Should I remove the line from the PR?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes

@jaytaph
Copy link
Contributor Author

jaytaph commented Sep 27, 2014

One thing I didn't want to change, is the fact that the validatorGuesser guesses "Range" constraints to be a number FormType.

It might make sense to change this into this new range FormType, but this will break BC.

@@ -3,9 +3,9 @@ CHANGELOG

2.6.0
-----

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this line should not be removed

@stof
Copy link
Member

stof commented Oct 2, 2014

Please add tests for your new form type. and this will make you notice that you forgot to implement the support of the range type in the PHP form theme

@jaytaph
Copy link
Contributor Author

jaytaph commented Oct 2, 2014

@stof: ok.. are there currently formtype tests available, as I cannot find them. Maybe i'm looking in the wrong place?

@xabbuh
Copy link
Member

xabbuh commented Oct 3, 2014

@jaytaph You can have a look at the tests in src/Symfony/Component/Form/Tests/Extension/Core/Type.

@jaytaph
Copy link
Contributor Author

jaytaph commented Oct 3, 2014

@xabbuh I did, but types like EmailType etc are not in there as well, so I was a bit confused on where tests where. I've found the tests that @stof mentioned inside the Twig Bridge, which turns out failed on the missing php templates. I've added these, and the tests seem fine again.

@jaytaph
Copy link
Contributor Author

jaytaph commented Nov 21, 2014

Any news on this PR?

@webmozart
Copy link
Contributor

Thanks @jaytaph for working on this feature, this is much appreciated.

@webmozart webmozart closed this in 09fabfe Jun 17, 2015
weaverryan added a commit to symfony/symfony-docs that referenced this pull request Jul 16, 2015
This PR was merged into the 2.8 branch.

Discussion
----------

HTML5 range documentation

Hi,

| Q                      | A
| ------------- | ---
| Doc fix?            | yes
| New feature?   | yes
| BC breaks?      | no
| Deprecations? | no
| Fixed tickets    | [#5439]
| Code PR      | [12607]
| License       | MIT

I am trying to contribute to range added for the PR symfony/symfony#12067 & symfony/symfony#11979 which fixes #5439 .

Need some help on moving for I am really new to the documentation.

The current issues I feel is whether we need to add Basic usage or is that only reference ?

I had a look at http://symfony.com/doc/current/reference/forms/types/number.html which would have been similar, but that seems it referencing to choice seems more confusing.

I have looked into other types also and almost all are some what similar.

Any input is highly appreciated and will work on in the free time. If someone is interested please do take the PR or finish it .

Thank you.

Commits
-------

2863079 Fix moving the mapped down as per @xabbuh
abf3e8e Fix the rendering issue
3c6ff76 Fix issues reported by @snoek09 . Thank you.
a2c3f21 Make the necessary changes mentioned by @xabbuh and add example for form
d4d1f12 Starting with range documentation
@fabpot fabpot mentioned this pull request Nov 16, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants