{{ form_start(form) }}
{{ form_row(form.titre, {'attr': {'class': 'form-control'}}) }} {{ form_row(form.introduction, {'attr': {'class': 'form-control'}}) }} {{ form_row(form.description, {'attr': {'class': 'form-control'}}) }} {{ form_row(form.price, {'attr': {'class': 'form-control'}}) }} {{ form_row(form.adresse, {'attr': {'class': 'form-control'}}) }} {{ form_row(form.rooms, {'attr': {'class': 'form-control'}}) }}
{{ form_label(form.conditions) }} {% for child in form.conditions %}
{{ form_widget(child, {'attr': {'class': 'form-control mt-2'}}) }} {{ form_label(child, null, {'label_attr': {'class': 'form-control'}}) }}
{% endfor %}
{{ form_row(form.category, {'attr': {'class': 'form-control'}}) }}
{{ form_label(form.coverImage) }} {{ form_widget(form.coverImage, {'attr': {'class': 'form-control-file'}}) }} {{ form_errors(form.coverImage) }} Existing Image
{# Render the images field #}
{{ form_label(form.images) }} {{ form_widget(form.images, {'attr': {'class': 'form-control-file', 'multiple': 'multiple'}}) }} {{ form_errors(form.images) }} {# Display existing images (assuming Annonce has a method to get them) #} {% for image in annonce.getImages() %} Existing Image {% endfor %}
{{ form_row(form.wilaya, {'attr': {'class': 'form-control'}}) }} {{ form_row(form.commune, {'attr': {'class': 'form-control'}}) }}
{{ form_end(form) }}