I'm using Symfony3 form. I have aCountryType
in my Symfony form Builder. It's working correctly. But suppose the user belongs to a Company which is based in Spain. For that User I want to set the default country to be Spain and then show the rest of the countries. How can I do this in Symfony3.
I tried this but its not working.
$builder->add("country", CountryType::class, array(
"label" => "Country",
"required" => false,
"preferred_choices" => array(
"ES" => "Spain",
),
));
Thank you for your time.