bharani kumar:
This is my snippet
how to pass the argument for the form function ,
Below is the sample one, but not working,can u make it work,
$output[] .=drupal_get_form('username_form','$usernameID','$username');
function username_form(&$node, $form_values){ $form['userName'] = array( '#type' => 'select', '#title' => t('User Name'), '#options' => array( $usernameID => '$username', ), '#default_value' => '1', '#description' => t(''), '#required' => TRUE ); return $form;
}
Try not to use single quotes for variables. Like this:
$output[] .= drupal_get_form('username_form', $usernameID, $username);