form

Fieldsets in Drupal forms: FAPI 5 syntax

Key words and phrases: 
fieldset in Drupal forms field set
Description & Info: 

Drupal fieldsets can also have a description.

<?php
$form['placement_imagecache'] = array(
'#type' => 'fieldset',
'#title' => t('Imagecache settings per content type'),

Print a form, such as a search form, anywhere in Drupal

Key words and phrases: 
form anywhere print form print search form drupal print the searchform
search_form_in_page.png
Description & Info: 

Resolved error:

Missing argument 1 for search_box(), called in /sites/example/www/includes/common.inc(1352) : eval()'d code on line 5 and defined in /sites/example/www/modules/search/search.module on line 1037.

This was from code added to a page's content by a client or possibly even the previous developer. We completely redid the site but did copy-paste in some pages.

How to theme a Drupal form

Key words and phrases: 
Howto theme Drupal forms themeing input forms user_register with bio module
Description & Info: 

Update: This tutorial has been revised significantly to provide a robust solution consistently works.

Define a function named your_theme_name_ or phptemplate_ plus name_of_form($form).

Display a Drupal login form anywhere with PHP, including in page content

Key words and phrases: 
show Drupal user login form display user registration form in page signup form custom placement
Description & Info: 

Update: I gave slightly incorrect code, I'm pretty sure swapping out 'user_register' to put in 'user_login' will work just fine:

dan hak 3:08
whats the code for the login block

benjamin melançon 3:09

<?php
global $user;
if (!
$user->uid) {
?>

<div class="user-register">

<?php
print drupal_get_form('user_register');
?>

</div>