I'm following the dynamic-dependant-select-box-using-jquery-ajax tutorial. I have succesfully integrated in my form for creating new records, but I have an issue on EDIT form.
On edit form the "Country field is populated and the State field is empty.
Can you help please?
Thank for asking us.
I see you following this tutorial : https://itsolutionstuff.com/post/laravel-5-dynamic-dependant-select-box-using-jquery-ajax-example-part-2example.html , i think for edit you need to pass $states variable with selected country. like this way:
$countries = DB::table('countries')->pluck("name","id")->all();
$states = DB::table('states')->where('id_country',$id_country_selected)->pluck("name","id")->all();