Is it possible to retrieve only parts of a form for display, that is, only certain form elements?
I am looking at the stack for building the node form, and so far the functions I've seen work with wholesale forms, in this case the node_form
.
drupal_retrieve_form(): /.../http/includes/form.inc at line 752
drupal_build_form(): /.../http/includes/form.inc at line 331
drupal_get_form(): /.../http/includes/form.inc at line 123
I am interested in only retrieving (rendering) the default body field via AJAX only for a preview type of display. So far I've been successfully build and render the whole node form just using the #AJAX
FAPI property and other Drupal hooks - but I was wondering if something similar was possible for just one field. Answers that point to Drupal core APIs instead of contrib modules (who may be using their own jQuery magic) are a plus.
I'm just gathering thoughts to see how I write a D7 module for this question.