You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a custom Entity for a simple basic CRUD operation. The form is rendering fine and works well. However, I am doing some custom validation in the PRE_SUBMIT and would like to redirect back to the form page with user's previously inserted values.
I have tried it through the URL params and also sessions but both doesn't work.
$builder->addEventListener(FormEvents::PRE_SUBMIT, function (FormEvent $event) {
$data = $event->getData();
if($data['name'] == "unavailable"){
// I would like to redirect back to the form page and pre-fill the name field.
// I have tried to set it through URL params and as well as in the session (both doesn't) work.
}
}
The text was updated successfully, but these errors were encountered:
I have a custom Entity for a simple basic CRUD operation. The form is rendering fine and works well. However, I am doing some custom validation in the PRE_SUBMIT and would like to redirect back to the form page with user's previously inserted values.
I have tried it through the URL params and also sessions but both doesn't work.
The text was updated successfully, but these errors were encountered: