Now that Drupal 7 has the standardized facility of cleaning out submitted form values prior to storing them, we should
1) make sure that it's actually used throughout core.
2) give modules a chance to possibly clean their internal values, too. (I have a concrete use-case for that.)
On 2), the simple drupal_alter() helps modules that inject additional form elements into a form, allowing them to remove the submitted form values for those elements before the primary submit handler goes along and stores all submitted form values in the database (most often, that is some kind of serialization process).
Comment | File | Size | Author |
---|---|---|---|
#7 | drupal8.form-state-values-clean.7.patch | 3.04 KB | sun |
drupal.form-state-values-clean.0.patch | 3.33 KB | sun | |
Comments
Comment #1
sundrupal.form-state-values-clean.0.patch queued for re-testing.
Comment #2
sundrupal.form-state-values-clean.0.patch queued for re-testing.
Comment #3
sunFeedback, anyone?
Comment #4
sundrupal.form-state-values-clean.0.patch queued for re-testing.
Comment #5
sundrupal.form-state-values-clean.0.patch queued for re-testing.
Comment #7
sunWoah. A CVS patch! ;)
Comment #8
tstoecklerAs the example hook demonstrates I think a hook_form_state_FORM_ID_values_clean_alter() would be cool. Generally, very nice suggestion, though, I like this.