$form['buddylist_block_title'] = array(
'#type' => 'textfield',
'#title' => t('Block title'),
'#default_value' => t('the default value'),
'#size' => 70,
'#maxlength' => 128,
'#description' => t('This will be the title for the recent buddies post block. If none is specified, the default will be used.'),
);
Now if I do
print form_render($form)
I get.
<div class="form-item" id="css_">
<label>Block title:</label><br /_">
<span class="description">(This will be the title for the recent buddies post block. If none is specified, the default will be used.)</span><br /_">
<input type="text" maxlength="128" class="form-text" name="" id="" size="70" value="" /_"><br /_">
</div">
Nice and dandy, no complain here.
Now I add another form element to the form array
$form['s_b'] = array(
'#type' => 'button',
'#title' => t('Submit'),
);
After that I again do print form_render($form)
Should not I get the un-rendered form element printed again?
But nothing is get printed. It seems I am getting an empty string from form_render method the second time I call it.
This is driving me crazy.
I was trying to convert buddylist.module to 4.7 and playing with the new form API but I don't get it.
Can some expert please convert the method
buddylist_buddiesgroups_form in buddylist.module so that I know how it is done.