Formype auf Symfony 7.3, das nicht rendertPhp

PHP-Programmierer chatten hier
Anonymous
 Formype auf Symfony 7.3, das nicht rendert

Post by Anonymous »

vorher mit meinem Symfony -Projekt mit der Version 6.1 könnte ich es tun. < /p>

Code: Select all

{{ form_start(form, {'attr': {'id': 'form-add-meeting'}}) }}
{{ form_widget(form) }}

Date *


Horaire *


{{ form_end(form) }}
Now when I try with the version 7.3 of Symfony, I get that error :
"An exception has been thrown during the rendering of a template ("Warning: Array to string conversion") in form_div_layout.html.twig at line 374"
I searched everywhere on the web and I don't find any answer, any Lösung. < /p>
Ich habe versucht, mit Form_Row Feld für Feld hinzuzufügen, und es funktioniert nicht.
Form_Label funktioniert auch nicht. FormType: < /p>

Code: Select all

public function buildForm(FormBuilderInterface $builder, array $options): void
{
$builder
->add('jump', JumpAutocompleteField::class)
->add('purchase_custom_link', TextType::class, [
'mapped' => false,
'required' => false,
'label' => 'N° Sport Découverte',
'attr' => [
'class' => 'form-control mb-3'
]
])
->add('purchase_item', OrderLinkAutocompleteField::class)
->add('client_lastname', TextType::class, [
'required' => false,
'label' => 'Nom',
'attr' => [
'class' => 'form-control mb-3',
'maxlength' => 60
]
])
->add('client_name', TextType::class, [
'required' => false,
'label' => 'Prénom',
'attr' => [
'class' => 'form-control mb-3',
'maxlength' => 60
]
])
->add('client_email', EmailType::class, [
'required' => false,
'label' => 'Adresse email',
'attr' => [
'class' => 'form-control mb-3',
'maxlength' => 120
]
])
->add('client_phone', TextType::class, [
'required' => false,
'label' => 'Numéro de téléphone',
'attr' => [
'class' => 'form-control mb-3',
'maxlength' => 10
]
])
->add('client_age', TextType::class, [
'required' => false,
'label' => 'Âge',
'attr' => [
'class' => 'form-control mb-3',
'maxlength' => 2
],
])
->add('client_height', TextType::class, [
'required' => false,
'label' => 'Taille (cm)',
'attr' => [
'class' => 'form-control mb-3',
'maxlength' => 3
]
])
->add('client_weight', TextType::class, [
'required' => false,
'label' => 'Poids (kg)',
'attr' => [
'class' => 'form-control mb-3',
'maxlength' => 3
]
])
;
}

Quick Reply

Change Text Case: 
   
  • Similar Topics
    Replies
    Views
    Last post