Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: John Linhart <[email protected]>
  • Loading branch information
luk4s and escopecz authored May 24, 2024
1 parent 4997b84 commit 4f6fc17
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions docs/themes/forms.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,20 +17,19 @@ You can add a custom style sheet to the Form by adding a ``_style.html.twig`` wi
Customize field types
*********************

For change HTML generated by field types, you can create a new template in the `Field` directory.
I recommend copy the original template from `app/bundles/FormBundle/Resources/views/Field/*.html.twig` and modify it.
Create a new template in the `Field` directory to change HTML generated by field types.
The best way is to copy the original template from `app/bundles/FormBundle/Resources/views/Field/*.html.twig` and modify it.


How modify templates including base `text.html.twig` template
=============================================================
How to modify templates including base `text.html.twig` template
================================================================

Several templates including the base `text.html.twig` template.
So you will want modify it, but you also need modify templates including it - change `include` statement.
Several templates are including the base `text.html.twig` template so you may need modify it. In that case you also need to modify templates including it. Change the `include` statement.

For example `email.html.twig` including::
For example `email.html.twig` including:

{{ include('@MauticForm/Field/text.html.twig', { ...

Check warning on line 31 in docs/themes/forms.rst

View workflow job for this annotation

GitHub Actions / prose

[vale] reported by reviewdog 🐶 [Google.Ellipses] In general, don't use an ellipsis. Raw Output: {"message": "[Google.Ellipses] In general, don't use an ellipsis.", "location": {"path": "docs/themes/forms.rst", "range": {"start": {"line": 31, "column": 54}}}, "severity": "WARNING"}

you need change `@MauticForm` to you theme, for example::
you need change `@MauticForm` to you theme, for example:

{{ include('@themes/MyTheme/Field/text.html.twig', { ...

Check warning on line 35 in docs/themes/forms.rst

View workflow job for this annotation

GitHub Actions / prose

[vale] reported by reviewdog 🐶 [Google.Ellipses] In general, don't use an ellipsis. Raw Output: {"message": "[Google.Ellipses] In general, don't use an ellipsis.", "location": {"path": "docs/themes/forms.rst", "range": {"start": {"line": 35, "column": 58}}}, "severity": "WARNING"}

0 comments on commit 4f6fc17

Please sign in to comment.