Posted by jfrederick on June 14, 2012 at 4:04pm
Hey y'all!
In my element validation function I am passed both $element and $form_state by reference. I would really like to alter the submitted data (a date field) within the $element array, since the month, day, and year are separated in different keys. Specifically, I am modifying the year. But I have tried overwriting the year in various places in $element, but it doesn't seem to alter the submitted data.
Do I have to modify $form_state, and $element is just for looking at? What is the relationship/order between $element and $form_state?
Any help is greatly appreciated! Thanks!!