i made a function which i call at the hook_form_alter() for << many times>> .... my problem is i want to make one fieldset that hold my textarea(s) which generate at the function when i did that i have two results first the fieldset rebated itself... the function in this case like that:
function notification_form($num, $parm, $tit, $des = NULL){
$form['disable notifications'] = array(
'#title' => t('Disable notifications'),
'#type' => 'fieldset',
);
$form['disable notifications']['mail_checkbox_alter'] = array(
'#type' => 'checkbox',
'#title' => t('Disable notifications'),
'#default_value' => 0,
);
$form['disable notifications']['message'.$num] = array(
'#title' => t($tit),
'#type' => 'textarea',
'#default_value' => $parm,
'#description' => t($des),
);
return $form;
}
the second result is just the first text area be at the fieldset and the others out from it the function in that case be like:
function notification_form($num, $parm, $tit, $des = NULL){
if($num == 1){
$form['disable notifications'] = array(
'#title' => t('Disable notifications'),
'#type' => 'fieldset',
);
$form['disable notifications']['mail_checkbox_alter'] = array(
'#type' => 'checkbox',
'#title' => t('Disable notifications'),
'#default_value' => 0,
'#description' => t("If you want to disable mailing functions on this action check this option. (it will be enabled automatically after submitting the form)"),
);
$form['disable notifications']['message'.$num] = array(
'#title' => t($tit),
'#type' => 'textarea',
'#default_value' => $parm,
'#description' => t($des),
);
}
else{
$form['disable notifications']['message'.$num] = array(
'#title' => t($tit),
'#type' => 'textarea',
'#default_value' => $parm,
'#description' => t($des),
);
}
}
i've a bad day, didn't sleep for two days and i can't think anymore so please any help....
Comments
hay guys any help
hay guys any help
What does your
What does your hook_form_alter() function look like? Please remember to post your code between <code> and </code> tags.
thanks man, i fixed it...
thanks man, i fixed it... hope to not work without sleeping again