<div>My form code is as below.</div>
<div> </div>
<div>//Add a wrapper for the AHAH variables.<br>$form[&#39;work_history_wrapper&#39;] = array(<br>&#39;#title&#39; =&gt; t(&quot;Work history: Mention all the companies you gave worked so far&quot;),<br>&#39;#type&#39; =&gt; &#39;fieldset&#39;,<br>
&#39;#collapsible&#39; =&gt; TRUE,<br>&#39;#collapsed&#39; =&gt; FALSE,<br>&#39;#prefix&#39; =&gt; &#39;&lt;div class=&quot;clear-block&quot; id=&quot;work-history-wrapper&quot;&gt;&#39;,<br>&#39;#suffix&#39; =&gt; &#39;&lt;/div&gt;&#39;,<br>
);</div>
<div>$form[&#39;work_history_wrapper&#39;][&#39;company&#39;] = array(<br>&#39;#type&#39; =&gt; &#39;textfield&#39;,<br>&#39;#title&#39; =&gt; t(&#39;Company&#39;),<br>&#39;#size&#39; =&gt; 30,<br>&#39;#maxlength&#39; =&gt; 100,<br>
);</div>
<div>$form[&#39;work_history_wrapper&#39;][&#39;sdate&#39;] = array(<br>&#39;#type&#39; =&gt; &#39;date&#39;,<br>&#39;#title&#39; =&gt; t(&#39;Start Date&#39;),<br>);</div>
<div>$form[&#39;work_history_wrapper&#39;][&#39;edate&#39;] = array(<br>&#39;#type&#39; =&gt; &#39;date&#39;,<br>&#39;#title&#39; =&gt; t(&#39;End Date&#39;),<br>);</div>
<div> $form[&#39;work_history_wrapper&#39;][&#39;morecompany&#39;] = array(<br>&#39;#type&#39; =&gt; &#39;button&#39;,<br>&#39;#value&#39; =&gt; &#39;Add More Company...&#39;,<br>&#39;#attributes&#39; =&gt; array(&#39;onclick&#39; =&gt; &#39;return false;&#39;),<br>
);</div>
<div> </div>
<div> </div>
<div>Please let me know,, how can I make use of AHAH, so that on clicking add  more company button, will add more rows.</div>
<div> </div>
<div>Thanks<br><br></div>
<div class="gmail_quote">On Thu, Mar 10, 2011 at 3:16 PM, Austin Einter <span dir="ltr">&lt;<a href="mailto:austin.einter@gmail.com">austin.einter@gmail.com</a>&gt;</span> wrote:<br>
<blockquote style="BORDER-LEFT: #ccc 1px solid; MARGIN: 0px 0px 0px 0.8ex; PADDING-LEFT: 1ex" class="gmail_quote">
<div>Thanks Steve.</div>
<div>I wanted to do it through custom module because of certain reasons.<br></div>
<div>I had three questions.</div>
<div class="im">
<div> </div>
<div> 1. How can I add 4 fields in one line. By default these are coming below of<br> earlier field.<br> 2. How to make use of AHAH.<br> 3. Also one more challenge for me is how do act on &quot;onClick&quot; of &quot;*Add More<br>
 ...*&quot; button, by default it may call submit handler.<br> <br></div></div>
<div>Now I have resolved 1st issue through CSS rules.</div>
<div> </div>
<div>Please give me input on 2nd and 3rd questions.</div>
<div><br> </div>
<div>Thanks</div>
<div> </div>
<div class="gmail_quote">
<div class="im">On Thu, Mar 10, 2011 at 8:28 AM, Steve Kessler <span dir="ltr">&lt;<a href="mailto:skessler@denverdataman.com" target="_blank">skessler@denverdataman.com</a>&gt;</span> wrote:<br></div>
<blockquote style="BORDER-LEFT: #ccc 1px solid; MARGIN: 0px 0px 0px 0.8ex; PADDING-LEFT: 1ex" class="gmail_quote">
<div>
<div></div>
<div class="h5">
<p>You can use the 3.x Alpha 1 of CCK. <a href="http://drupal.org/project/cck" target="_blank">http://drupal.org/project/cck</a> </p>
<p>I used this on a site recently and it worked well. </p>
<p>Thanks,</p>
<p>Steve </p>
<p>Steve Kessler<br>Owner, DenverDataMan<br>(303) 587-4428</p>
<p>This email was sent from my Droid.</p>
<div>
<div></div>
<div>
<div class="gmail_quote">On Mar 9, 2011 7:39 PM, &quot;Austin Einter&quot; &lt;<a href="mailto:austin.einter@gmail.com" target="_blank">austin.einter@gmail.com</a>&gt; wrote:<br type="attribution">&gt; Hi<br>&gt; I am making a custom form, where I want to have work history of a person in<br>
&gt; one line and at the end of line a button &quot;add more&quot;.<br>&gt; It will look some thing like as below -<br>&gt; <br>&gt; *Company * *Start-Date* *End-Date* *Add More ...*<br>&gt; **<br>&gt; If user clicks on button &quot;*Add More ...*&quot; then it should add one more line<br>
&gt; and my form should look as below<br>&gt; <br>&gt; *Company * *Start-Date* *End-Date* *Add More ...*<br>&gt; *Company * *Start-Date* *End-Date* *Add More ...*<br>&gt; <br>&gt; So how many times user clicks &quot;*Add More ...*&quot;, those many rows should be<br>
&gt; shown up.<br>&gt; <br>&gt; How can I acheive it in Drupal. As per documentation and google search AHAH<br>&gt; is capable of doing it.<br>&gt; Please correct me if wrong.<br>&gt; <br>&gt; My custom form code is as below. My questions are -<br>
&gt; <br>&gt; 1. How can I add 4 fields in one line. By default these are coming below of<br>&gt; earlier field.<br>&gt; 2. How to make use of AHAH.<br>&gt; 3. Also one more challenge for me is how do act on &quot;onClick&quot; of &quot;*Add More<br>
&gt; ...*&quot; button, by default it may call submit handler.<br>&gt; <br>&gt; A step by step approach will help me, as first time I am looking at AHAH.<br>&gt; <br>&gt; Best Regards<br>&gt; Austin<br></div></div></div><br>
</div></div>
<div class="im">--<br>[ Drupal support list | <a href="http://lists.drupal.org/" target="_blank">http://lists.drupal.org/</a> ]<br></div></blockquote></div><br></blockquote></div><br>