Greetings

I'm theming my webform but I have a pair of issues, maybe you could help me. I'm showing the whole webform with print drupal_render($form['submitted']), but I'm not able of showing the submit button! Is there a separate command for showing the submit button?

Also, as I'm fully theming thw ebform, I would like to hide all the textfield labels. Is this possible?

Thank you very much!

Comments

quicksketch’s picture

Title: Show submit button and hide textfield labels » Submit button does not print when themed

In order to print the submit button, you need to print the rest of the form. The $form['submitted'] portion only includes the fields that you configured and doesn't include several hidden fields and the submit button that Webform needs to save the form.

Something like this will work:

// Print out the form fields.
print drupal_render($form['submitted']);

// Then print out remaining parts, like the submit button.
print drupal_render($form);

Drupal is smart enough to not print out the fields that you've already printed out a second time, and you should always end any theming with a drupal_render() of the entire form object just to make sure that any fields you've missed will be printed out.

Please do not bundle multiple questions into a single issue, it makes information more difficult to find.

quicksketch’s picture

Status: Active » Closed (fixed)