Stack Exchange network consists of 183 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
I am wondering if there is a way to create a Drupal form on the fly with javascript? I know I can create a form, but how could I create all the Drupal hidden fields and other required pieces?
@Clive while that question covers outputting the HTML for the form, there seems a lot of functionality missing. I'm trying to do this and I get the form, but not the behaviors, e.g. the autocomplete tag field is not autocompleting.
Drupal.attachBehaviors()
after the AJAX call - problem solved