hi
i tryed to migrate a module from 4.6 to 4.7. there are so many changes required by foram api... but ok, this seems to be done mostly.
but there is a different problem now. the $_POST['edit'] sometimes does not contain anything. the strange thing, it is filled with a array, build from the form, but if there is a "required" field not filled correctly i get the form back for correction. i i correct now the setting and then POST the form the $_POST['edit'] does not contain anything. i'm realy frustrated... 3 days and no success. what is wrong?
function test() {
$prefix = 'example';
$form['config'] = array(
'#type' => 'fieldset',
'#title' => t('Test selection'),
);
print "testA";
if ($_POST['edit']) {
print "testB";
// does not work (whats wrong???)
$p = $form_values[$prefix.'_test'];
print_r ($p);
// works well
$p = $_POST['edit'][$prefix.'_test'];
print_r ($p);
} else {
print "testC";
}
// blah blah code...
return $form;
}
If i post this form the first time i get "testA" and "testB". If i repost the form after correcting a value i only get "testA" and never "testB".
PS: this is not the original code, it's an easier stripped example and i must understand...