I have a form, with 2 fields, that are select lists.
I need to select an option from select_list_1 that then populates select_list_2
I have the following in my template:
<script type="text/javascript">
$(document).ready(function() {
$('select#sf_guard_user_profile_corp_id').change(function() {
$.ajax({
url: "updateAreaManager?corp_id=" + this.value,
dataType: "text/html",
success: (function(data) {
$('select#sf_guard_user_profile_area_manager_id').html(data);
})
});
});
});
</script>
This calls the executeUpdateAreaManager
method, which currently is simply:
public function executeUpdateAreaManager(sfWebRequest $request)
{
$id = $request->getParameter('corp_id');
}
Would someone be able to help me get the data I need into the second select list?
Thanks