As discussed first in #736298-21: Refactor file.module to use proper button click detection, enabling FAPI to improve button click detection security currently the FAPI first executes the value callback then the #process callback for input elements. But that way it's impossible to set the element value depending on the values of the child elements generated by the #process callback.
As of now this can be done in d7 by using an after build callback - but it's rather hard to do. See http://drupal.org/cvs?commit=353180 for how it can be done now.
I think the process callback should run before any values are assigned, that way the value callback can access the processed form element values of its children - which makes a lof of sense to me. Usually the form element value of a processed element depends on the values of its child element, so it does not make much sense to set it beforehand.
For that to work the #process callbacks in core need a clean up. Probably there is no cause to do is for d7 now, so setting to d8.
Comments
Comment #1
effulgentsia CreditAttribution: effulgentsia commentedSubscribing. I'm looking forward to the opportunity of a full major release cycle for us to rethink the entire FAPI architecture.
Comment #2
sunWe should discuss and agree on a new issue tag for all our major form/AJAX/entity refactoring for D8. (similar to the "D7 Form API Challenge" tag)
Comment #3
effulgentsia CreditAttribution: effulgentsia commentedD8 Form API Challenge?
Comment #4
jhedstromThe internals of form processing have changed drastically in 8.x, so if there's still more to be done, this needs clarification.
Comment #16
smustgrave CreditAttribution: smustgrave at Mobomo commentedClosing as outdated since there has not been a follow since this issue moved to PNMI 7 years ago.