possible fixes
This commit is contained in:
@@ -110,17 +110,18 @@ function travel_form($node, &$form_state, $inserting = FALSE, $node = NULL, $tok
|
||||
//there's already info in $node so use that
|
||||
if (!empty($node)) {
|
||||
$data = $node;
|
||||
watchdog('booking_debug', "<pre>Travel form not-empty node:\n@info</pre>", array('@info' => print_r( $form_state, true)));
|
||||
}
|
||||
//otherwise rely on the form state from the previous submission
|
||||
else {
|
||||
$data = $form_state['input'];
|
||||
watchdog('booking_debug', "<pre>Travel form:\n@info</pre>", array('@info' => print_r( $form_state, true)));
|
||||
$data = $form_state['node'];
|
||||
watchdog('booking_debug', "<pre>Travel form empty node:\n@info</pre>", array('@info' => print_r( $data, true)));
|
||||
}
|
||||
|
||||
//get info about this person from the relevant node id
|
||||
$person = db_query("SELECT booking_dietary, booking_medical_conditions, booking_bf_gf_nid, booking_partner_id, booking_room_mate1 " .
|
||||
"FROM {booking_person} " . "WHERE nid = :nid ",
|
||||
array(':nid' => isset($node->nid) ? $node->nid : $data->booking_person_nid))->fetchObject();
|
||||
array(':nid' => $data->nid))->fetchObject();
|
||||
|
||||
if ($person) {
|
||||
$booking_dietary = $person->booking_dietary;
|
||||
@@ -134,7 +135,7 @@ function travel_form($node, &$form_state, $inserting = FALSE, $node = NULL, $tok
|
||||
//store the node id
|
||||
$form['personid'] = array(
|
||||
'#type' => 'hidden',
|
||||
'#value' => $node->nid,
|
||||
'#value' => $data->nid,
|
||||
);
|
||||
|
||||
$form['travel'] = array(
|
||||
|
Reference in New Issue
Block a user