as far as I understand it whenever you submit and rebuild a form (e.g. 'Add another item' on fields with infinite cardinality) something like this happens:
- User submits a form with filled values
- User input is copied to $form_state
- Element validation happens
- Form validation happens
drupal_get_formis called (form is being rebuild)
- ??? old user input from $form_state is copied to every
- Individual elements of the form are created in
- Rebuild form is shown to a user
My question is, when and how is user input from the old form transferred into the new one?
From what I've been able to understand by reading the documentation it must happen somewhere in
drupal_build_form before the element
#process callback is called. But when exactly that I haven't been able to find.
//I know about this FAPI flowchart if anyone could point me in the right direction on it I'd appreciate it.