By kcybulski on
Why in my module, value of this field is not passed to hook_insert/update ? values of $field_1 and $field_2 are send.
$form[$field_1][$field_2][$field_3] = array(
'#type' => 'textfield',
'#size' => 6,
'#field_suffix' => t('tons'),
'#field_prefix' => t('Sale'),
);
Any hint ?
Comments
First $field_1, $field_2 and
First $field_1, $field_2 and $field_3 to be to strings, lets say they are 'a', 'b' and 'c' (generally the strings need to be valid PHP variable names). Using the example values, you should see 'c' in hook_insert and hook_update.
So if this should work "by
So if this should work "by default", there must be error in my code, full hook_form()
All fields above works fine, I see them in print_r($node) in hook_update, but not this one
When you have something like
When you have something like $form['a']['b']['c'], the form api only "remembers" 'c' unless you set '#tree' to TRUE on the outer elements ( ex $form['a']['#tree'] = TRUE).
But I don't care if it is
But I don't care if it is $form[a][b][c], for me $form[c] is OK, but for now I don't get this at all,
I get values of
but I don't get value of
it should be [size_5_1] ?
I see where you set
I see where you set
$form["term_$tr_id"]["size_$tr2_id"] = array(as a date popup, I don't believe it can have child fields like$form["term_$tr_id"][$tr2_id_date_i][$tr2_id_size_i] = array(Nesting fields is completely broken
Yes, it's seems that nesting fields is completely broken, you can nest inside "fieldset" and nothing more. For now I solved this by:
madness, two additional fields, added for nothing :-(
BTW: Do you know how to show date_popup and textfield in one line ? two "textfield" fields do this automagicly
Chris
You can get rid of the
You can get rid of the fieldset with