Skip to main content
edited tags
Link
avpaderno
  • 97.9k
  • 15
  • 164
  • 284
Post Migrated Here from stackoverflow.com (revisions)
Source Link
Rotari Radu
  • 259
  • 2
  • 10

Drupal render form not rendering a form

I have a cutom module which creates a page with a custom form. the problem is that i don't print whole form at once like :

$form = drupal_get_form('custom_example_form', $adverts);
print render($form);

Rather my code is like:

$form = drupal_get_form('custom_example_form', $adverts);
print render($form['name']);
print render($form['descriere']);
print render($form['submit']);
print render($form['form_id']);
print render($form['form_build_id']);

The problem us that is second example drupal is not generating

<form id="" accept-charset="" method="" action="">

How do i generate in second situation?