<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=UTF-8" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
bharani kumar:
<blockquote
cite="mid:2240033d0903180927r2f50ca03l2ab7fb710792223a@mail.gmail.com"
type="cite"><br clear="all">
This is my snippet
<div><br>
</div>
<div><span class="Apple-style-span" style="font-weight: bold;"> how
to pass the argument for the form function ,</span><br>
</div>
<div><span class="Apple-style-span" style="font-weight: bold;"><br>
</span></div>
<div><span class="Apple-style-span" style="font-weight: bold;">Below
is the sample one, but not working,can u make it work,</span></div>
<div><br>
</div>
<div><span class="Apple-style-span" style="font-weight: bold;">$output[]
.=drupal_get_form('username_form','$usernameID','$username');</span><br>
</div>
<div><br>
</div>
<div><br>
<div><br>
</div>
<div>
<div>function username_form(&$node, $form_values){</div>
<div><span class="Apple-tab-span" style="white-space: pre;"> </span>$form['userName']
= array(</div>
<div><span class="Apple-tab-span" style="white-space: pre;"> </span>'#type'
=> 'select',</div>
<div><span class="Apple-tab-span" style="white-space: pre;"> </span>'#title'
=> t('User Name'),</div>
<div><span class="Apple-tab-span" style="white-space: pre;"> </span>'#options'
=> array(</div>
<div><span class="Apple-tab-span" style="white-space: pre;"> </span>$usernameID
=> '$username',</div>
<div><span class="Apple-tab-span" style="white-space: pre;"> </span>),</div>
<div><span class="Apple-tab-span" style="white-space: pre;"> </span>'#default_value'
=> '1',</div>
<div><span class="Apple-tab-span" style="white-space: pre;"> </span>'#description'
=> t(''),</div>
<div><span class="Apple-tab-span" style="white-space: pre;"> </span>'#required'
=> TRUE</div>
<div><span class="Apple-tab-span" style="white-space: pre;"> </span>);</div>
<div><span class="Apple-tab-span" style="white-space: pre;"> </span></div>
<div><span class="Apple-tab-span" style="white-space: pre;"> </span>return
$form;</div>
<div><br>
</div>
<div>}</div>
</div>
</div>
</blockquote>
Try not to use single quotes for variables. Like this:<br>
<br>
$output[] .= drupal_get_form('username_form', $usernameID, $username);<br>
</body>
</html>