symfony 5 Can't get a way to read the property "tipoinvitado" in class symfony 5 Can't get a way to read the property "tipoinvitado" in class symfony symfony

symfony 5 Can't get a way to read the property "tipoinvitado" in class


tipoinvitado is not a property of Evento. If you want to add form fields that are not properties of the form data class simply add 'mapped' => false to your field.

->add('tipoinvitado', ChoiceType::class, array(            'label' => 'Prioridad',            'mapped' => false,            'choices' => array(                'VIP' => 'VIP',                'Empresa' => 'Empresa'            )        ))