How can I add form elements in custom form on click of link? I want to add form elements inside my custom form when some body clicks on the link outside the form. Links are like :


Add textfield
Add selectlist


When user click on any link it via ajax add an element to the form. I just want and idea whether it is possible or not in drupal. If it is possible then just give me some idea about this.

Thanks
You should take a look at Examples module or in particular the AJAX example
 https://api.drupal.org/api/examples/ajax_example!ajax_example.module/7 It's really helpful.