8000 Added a note about customizing a form with more than one template by javiereguiluz · Pull Request #3875 · symfony/symfony-docs · GitHub
[go: up one dir, main page]

Skip to content

Added a note about customizing a form with more than one template #3875

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

Merged
merged 6 commits into from
Jul 11, 2014
Merged

Added a note about customizing a form with more than one template #3875

merged 6 commits into from
Jul 11, 2014

Conversation

javiereguiluz
Copy link
Member
Q A
Doc fix? no
New docs? yes
Applies to 2.3+
Fixed tickets #3643

@@ -298,6 +298,33 @@ When the ``form.age`` widget is rendered, Symfony will use the ``integer_widget`
block from the new template and the ``input`` tag will be wrapped in the
``div`` element specified in the customized block.

Multiple templates
Copy link
Member

Choose a reason for hiding this comment

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

Multiple Templates

@weaverryan
Copy link
Member

This makes sense, but to be difficult, is there value in showing both ways? Should we pick just one of the ways and show it? Disagree?

@xabbuh
Copy link
Member
xabbuh commented Jun 4, 2014

What do you mean with both ways, @weaverryan? A single file vs. multiple files?

@weaverryan
Copy link
Member

I mean showing:

{% form_theme form '::common.html.twig' ':Form:fields.html.twig' %}

AND

{% form_theme form with ['::common.html.twig', ':Form:fields.html.twig'] %}

I think we should just pick one of these formats and not show the other one. I don't believe there is a difference between the 2 functionally.

@stof
Copy link
Member
stof commented Jun 7, 2014

The with syntax allows to use any valid Twig expression, which means you can use variables in it

@stof
Copy link
Member
stof commented Jun 7, 2014

my suggestion is to document the with syntax. The syntax without with is the older syntax from 2.0

@weaverryan
Copy link
Member

I agree with Stof. @javiereguiluz if you agree, can we just show the with syntax?

@javiereguiluz
Copy link
Member Author

@stof @weaverryan thanks for your suggestions! I've just removed the old syntax explanation.

Multiple Templates
..................

A form can also be customized applying several templates. To do so, pass the
Copy link
Member

Choose a reason for hiding this comment

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

... form can also be customized by applying several templates. To do this, pass

Multiple Templates
..................

A form can also be customized applying several templates. To do this, pass the
Copy link
Member

Choose a reason for hiding this comment

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

... can also be customized by applying several templates...

@javiereguiluz
Copy link
Member Author
8000

@weaverryan excuse me for taking so long to fix the error that you reported. I think that now everything is OK to merge it.

@weaverryan
Copy link
Member

It's cool - we've been busy :). Thanks for this!

@weaverryan weaverryan merged commit ce14104 into symfony:2.3 Jul 11, 2014
weaverryan added a commit that referenced this pull request Jul 11, 2014
…e template (javiereguiluz)

This PR was merged into the 2.3 branch.

Discussion
----------

Added a note about customizing a form with more than one template

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

Commits
-------

ce14104 Fixed a minor grammar mistake
1b386ff Fixed a minor error
08d26ee Removed the old syntax and left just the "with" keyword syntax
94625c5 Fixed minor formatting issue
6621720 Minor formatting improvement
2b0213b Added a note about customizing a form with more than one template
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants
0