{{ form_errors(form) }} {{ form_start(form, {'attr': {'novalidate': 'novalidate', 'id': 'agate_add_product_form', 'class': 'form d-flex flex-column flex-lg-row'}}) }}

General

{{ form_label(form.name, 'Product Name', {'label_attr': {'class': 'required form-label'}}) }} {{ form_widget(form.name, {'attr': {'class': 'form-control mb-2', 'placeholder': 'Product name'}}) }}
{{ form_errors(form.name) }}
A product name is required and recommended to be unique.
{{ form_widget(form.description) }}
{# {{ form_label(form.description, 'Description', {'label_attr': {'class': 'required form-label'}}) }} #} {{ form_widget(form.description, {'attr': {'class': 'form-control mb-2'}}) }}
{{ form_errors(form.description) }}
Set a description to the product for better visibility.

Media

Set the main item image. Only *.png, *.jpg and *.jpeg image files are accepted
{{ form_errors(form.productMediaDoc) }}

Product Details

{{ form_label(form.category, 'Select category to add item to', {'label_attr': {'class': 'required form-label'}}) }} {{ form_widget(form.category, {'attr': {'class': 'form-select mb-2'}}) }}
{{ form_errors(form.category) }}
Add product to a category.
Create new category

Items

{% for item in form.items %}

Variations

{{ form_label(item.size, 'Size', {'label_attr': {'class': 'required form-label'}}) }} {{ form_widget(item.size, {'attr': {'class': 'form-select Sb-2'}}) }}
{{ form_errors(item.size) }}
Set the product size variation.
{{ form_label(item.color, 'Color', {'label_attr': {'class': 'required form-label'}}) }} {{ form_widget(item.color, {'attr': {'class': 'form-select Sb-2'}}) }}
{{ form_errors(item.color) }}
Set the product color variation.
{% endfor %}
{{ form_end(form) }}