I've been working on creating a form that pulls stored values from a database and then when the form is saved, updates the database with all the current values of the fields. The method being used can be seen in the below code sample.
The problem I'm having is that I'm able to get this fully functioning, the form displays, pulling all requested data from the database. When the save button is clicked, hook_form_submit gets called, my debug trace displays and the database gets updated. This works up to a point. As I add additional #default_value assignments using the identical method, all of a sudden when I click the save button, hook_form_submit is no longer being called.
Any thoughts or ideas on what may be causing this or what I can do to figure out what is happening here?
function hook_form ($form, &$form_submit) {
$desireddata_recall = get_desired_data();
$form['fieldone']= array(
'#type' => 'textarea',
'#default_value' => $desireddata_recall[0]->desiredfield,
'#rows' => 5,
'#resizable' => FALSE,
'#maxlength' => 1056,
'#size' => 50,
'#required' => TRUE,
);
$form['submit'] = array(
'#type' => 'submit',
'#value' => 'Save',
);
$form['cancel'] = array(
'#type' => 'submit',
'#value' => 'Cancel',
);
return $form;