I have a form with four fields - three of which are properly being sent up to the controller. One field is a drop-down selector field and it is not being sent. Here is sample form code from my schedule_date field which is being sent properly:
<?php
echo $this->Form->input("schedule_date"
,array('label' => false
,'type' => 'text'
,'class' => 'step_dates'
,'readOnly' => 'readOnly'
)
);
?>
And here is the code for the drop-down box which is NOT being sent properly:
<?php
echo $this->Form->input("project_step_type_id"
,array('label' => false
,'id' => 'project_step_type_id'
,'class' => 'project_step_type_id'
,'empty' => '( select step )'
,'options' => $project_step_types
)
);?>
Here is what my debug looks like on the form data I'm sending back (notice project_step_type_id is missing):
<pre class="cake-debug">
array(
'user_id' => '402',
'trainer_user_id' => '524',
'schedule_date' => '2014-11-26'
)
</pre>
Can anyone help? All fields are inside the form tag. I believe the issue is with this line:
request_data=$('#my_form input').serializeCakeArray();
It's not getting the "select" fields, only the "input" fields. Does anyone know how to fix that? Thank you.