[support] How to add fields dynamically in a page
    Austin Einter 
    austin.einter at gmail.com
       
    Thu Mar 10 02:38:59 UTC 2011
    
    
  
Hi
I am making a custom form, where I want to have work history of a person in
one line and at the end of line a button "add more".
It will look some thing like as below -
*Company  *       *Start-Date*      *End-Date*       *Add More ...*
**
If user clicks on button "*Add More ...*" then it should add one more line
and my form should look as below
 *Company  *       *Start-Date*      *End-Date*       *Add More ...*
 *Company  *       *Start-Date*      *End-Date*       *Add More ...*
So how many times user clicks "*Add More ...*", those many rows should be
shown up.
How can I acheive it  in Drupal. As per documentation and google search AHAH
is capable of doing it.
Please correct me if wrong.
My custom form code is as below. My questions are -
1. How can I add 4 fields in one line. By default these are coming  below of
earlier field.
2. How to make use of AHAH.
3. Also  one more challenge for me is how do act on "onClick" of  "*Add More
...*" button, by default it may call submit handler.
A step by step approach will help me, as first time I am looking at AHAH.
 Best Regards
Austin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.drupal.org/pipermail/support/attachments/20110310/31e273c7/attachment.html 
    
    
More information about the support
mailing list