i generate new.html.twig by CRUD the file is:
{{ form(form) }}
<ul class="record_actions">
<li>
<a href="{{ path('service') }}">
Back to the list
</a>
</li>
i need him in this form : can someone help me how i can override twig. and think's.
If you are asking about "how to customize form in symfony2" then here is an excellent article on it. Simplest way to customize part of your form twig, is doing something like it:
{% extends '::base.html.twig' %}
{% form_theme form _self %}
{% block integer_widget %}
<div class="integer_widget">
{% set type = type|default('number') %}
{{ block('form_widget_simple') }}
</div>
{% endblock %}
{% block content %}
{# ... render the form #}
{{ form_row(form.age) }}
{% endblock %}
on the link I provided, there are many examples.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With