I’m working with Symfony forms and need help with dependent dropdowns. Here’s my current form setup:
'country' => new sfWidgetFormChoice(array('choices' => CountryPeer::getCountryList())),
'region' => new sfWidgetFormChoice(array('choices' => RegionPeer::getRegionList())),
What I want to achieve is when a user selects a country from the first dropdown (for example USA), the second dropdown should automatically show only the regions that belong to that selected country. The important thing is I need to handle this on the server side without using any JavaScript solutions. How can I make these dropdowns work together where the second one depends on the first selection?