THELIA Forum

Welcome to the THELIA support and discusssion forum

Announcement

Rejoignez la communauté sur le Discord Thelia : https://discord.gg/YgwpYEE3y3

Offline


Hello,

I need help with a form on my website,
i have a problem with a form validation :

Error generated : [] This value sound not be empty. This form should not contain of additional fields

I have just this in my controller :

$this->formBuilder
            ->add('nb_travellers', 'text');

and the template :

{form name="custom.order.delivery"}

<form name="" id="form-cart-delivery" action="{url path="/order/delivery"}" method="post">

{if $form_error}<div class="alert alert-danger">{$form_error_message}</div>{/if}

{form_hidden_fields form=$form}

{form_field form=$form field='nb_travellers'}
<input type="text" name="{$name}" value="{$value}" {$attr}>
{/form_field}

<button type="submit" class="btn btn-checkout-next"><span>{intl l="Next Step"}</span></button>

</form>
{/form}

Any idea of my problem ?

Thanks in advance

Offline


Did you succeed doing what you want ?