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

Documenting missing form options #3410

Closed
17 tasks done
wouterj opened this issue Jan 3, 2014 · 6 comments
Closed
17 tasks done

Documenting missing form options #3410

wouterj opened this issue Jan 3, 2014 · 6 comments
Labels
actionable Clear and specific issues ready for anyone to take them. Form good first issue Ideal for your first contribution! (some Symfony experience may be required)

Comments

@wouterj
Copy link
Member

wouterj commented Jan 3, 2014

The form type reference is not yet fully updated. It should be updated in the 2.3 branch.

Documenting new options

Most of the missing options are already documented. You should check in the reference/forms/types/options/ directory to find if the option is already documented and if the description is correct for this type. If it is, you should add an include statement in the type reference article:

.. include:: /reference/forms/types/options/read_only.rst.inc

If the description is not correct for this type, you need to document it in the type reference article, not in the .rst.inc file, since it's used in multiple places where the current description is correct.

error_bubbling
~~~~~~~~~~~~~~
**type**: ``boolean`` **default**: ``false``

Some description and usage of the type.

If there is no documentation about the option and it is used in other types, you should create a new file in the reference/forms/types/options/ directory and include it in the relevant types.

If you are documenting an option that's new in a specific version, you should add a versionadded directive above it. This should only be done for types introduced in 2.2 or newer, not for 2.1:

.. versionadded:: 2.2
    The ``with_minutes`` option was introduced in Symfony 2.2.

with_minutes
~~~~~~~~~~~~
**type**: ``boolean`` **default**: ``true``

...

Removing/renaming an option

When an option should be removed or renamed, you should remove/rename the file from
/reference/forms/types/options and check all form types to remove/rename the
include statements, references and other occurences of that option.

The missing options in 2.3

datetime

form

radio

  • Parent type changed from field to form in 2.1.
  • value option should be removed from this type

time

weaverryan added a commit that referenced this issue Jan 7, 2014
…time option (bicpi)

This PR was merged into the 2.3 branch.

Discussion
----------

[Reference][Form Types] Document "with_minutes" time/datetime option

| Q             | A
| ------------- | ---
| Doc fix?      | yes
| New docs?     | yes
| Applies to    | 2.3+
| Fixed tickets | #3410 (task `time > with_minutes`)

The `datetime` field also has a `with_minutes` option.

Using the `single_text` widget type might not work as expected using `with_minutes=false` if the browser supports HTML5's `time` input type. Most browsers seem to only support `hh:mm` or `hh:mm:ss` formats for the value attribute (resetting the value to `--:--` if using an hour value only). This might not be the case for every browser because I couldn't find anything in the HTML5 spec that says a partial time cannot be an hour only. I've added a `caution` box for this.

Commits
-------

1e88b9d Fix "versionadded" position
8cfb850 [Reference][Form Types] Document "with_minutes" time/datetime option
weaverryan added a commit that referenced this issue Jan 9, 2014
…e (nykopol)

This PR was merged into the 2.3 branch.

Discussion
----------

[Reference][Form Types] Add "max_length" option in form type

| Q             | A
| ------------- | ---
| Doc fix?      | yes
| New docs?     | yes
| Applies to    | 2.3+
| Fixed tickets | #3410 (task Form -> max_length)

Commits
-------

b53a227 fix last typo on max length option
d6800d3 fix typo in previous commit
391fe30 fix typo in previous commit
2156545 add max_length to form field type
weaverryan added a commit that referenced this issue Jan 21, 2014
This PR was merged into the 2.3 branch.

Discussion
----------

[WIP][Reference][Form Types] Update "radio" form type

| Q             | A
| ------------- | ---
| Doc fix?      | yes
| New docs?     | no
| Applies to    | 2.3+
| Fixed tickets | #3410

`radio`'s parent is `checkbox`, not `form`.

I need some help regarding the task *value option should be removed from this type*:
Should it really be removed? It's because I'm able to set it and it is used in the HTML output. I'm retrieving a boolean value only when I access the submitted data via the form framework but I have also access to the raw, custom value via e.g. `$request->request->get('my_checkbox')`. So maybe it should be moved to the `inherited options` instead for the `radio` field? If yes, the wording would need an update for the `value` option and if no, why keep it for the `checkbox` field?

Commits
-------

322b21e Update&Outsource "value" option & update references
be47b90 Fix parent type doc reference
22b3d0c [Reference][Form Types] Update "radio" form type
weaverryan added a commit that referenced this issue Jan 21, 2014
…s to "form" type (bicpi)

This PR was merged into the 2.3 branch.

Discussion
----------

[Reference][Form Types] Add missing (but existing) options to "form" type

| Q             | A
| ------------- | ---
| Doc fix?      | yes
| New docs?     | no
| Applies to    | 2.3+
| Fixed tickets | #3410

* The removed link to `/cookbook/form/inherit_data_option` for the `inherit_data` option is contained in the existing and now referenced `options/inherit_data.rst.inc`.
* Fixed some formatting issues.
* I've tweaked the `empty_data` description to be a bit more generic as it was focused on the `choice` field only.

Commits
-------

dc22276 [Reference][Form Types] Add missing (but existing) form options to "form" type
weaverryan added a commit that referenced this issue Mar 4, 2014
…nd "method" option (bicpi)

This PR was merged into the 2.3 branch.

Discussion
----------

[Reference][Form Types] Add missing docs for "action" and "method" option

| Q             | A
| ------------- | ---
| Doc fix?      | no
| New docs?     | yes
| Applies to    | 2.3+
| Fixed tickets | #3410

I'm not sure of adding these two options as separate rst-files because I don't think they will get listed as `inherited` options. But no other options are embedded directly. Please let me know if I can improve that.

Commits
-------

793c8a0 Add note about the PATCH method
4555495 Update note wording for "method" option
70ca6da Improvements after review
cecc762 Update "method" description
a636945 Fixes after review
83ff4b1 Improve descriptions
1bf3ce0 [Reference][Form Types] Add missing docs for "action" and "method" option
@wouterj
Copy link
Member Author

wouterj commented Mar 4, 2014

Only one option left to do: auto_initialize of the Form type. Thank you @bicpi, @nykopol and @xabbuh for your great work on this issue!

@xabbuh
Copy link
Member

xabbuh commented Mar 4, 2014

Awesome! I'll add auto_initialize in #3611.

xabbuh added a commit to xabbuh/symfony-docs that referenced this issue Mar 8, 2014
xabbuh added a commit to xabbuh/symfony-docs that referenced this issue Mar 19, 2014
weaverryan added a commit that referenced this issue Mar 19, 2014
…ll options of the basic form type (xabbuh)

This PR was merged into the 2.3 branch.

Discussion
----------

[Reference][Forms] add an introductory table containing all options of the basic form type

| Q             | A
| ------------- | ---
| Doc fix?      | yes
| New docs?     | no
| Applies to    | all
| Fixed tickets |

Commits
-------

b3ca94c removed the description of the auto_initialize option from the button type reference docs
58170fe document the auto_initialize option for the form type, refs #3410
2ca0306 document the options inherited from the BaseType class
911cc70 add an introductory table containing all options of the basic form type
@wouterj
Copy link
Member Author

wouterj commented Mar 19, 2014

Thanks to @xabbuh, the last one if fixed too. That means it's the first time ever that the form options reference is complete! 🍰

Now, let's move onto the other reference articles :P

@wouterj wouterj closed this as completed Mar 19, 2014
@bicpi
Copy link
Contributor

bicpi commented Mar 19, 2014

😁

@wouterj
Copy link
Member Author

wouterj commented Mar 19, 2014

For people interested in history, this is how it looked like when it was created: feee616#diff-d630590f6ace919528a3829793c6e30fR1

@xabbuh
Copy link
Member

xabbuh commented Mar 19, 2014

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
actionable Clear and specific issues ready for anyone to take them. Form good first issue Ideal for your first contribution! (some Symfony experience may be required)
Projects
None yet
Development

No branches or pull requests

3 participants