Can you set form values at the validation() step?

Re: Can you set form values at the validation() step?

von Tim Hunt -
Anzahl Antworten: 1
Nutzerbild von Core developers Nutzerbild von Documentation writers Nutzerbild von Particularly helpful Moodlers Nutzerbild von Peer reviewers Nutzerbild von Plugin developers

To get data out of the validation process, don't try to save it into a hidden form field. Just save it as $this->computeraspectratio (or something), and add a $this->get_computed_aspect_ratio method (or something similar). (Or, you could override get_data() to include the extra computed values.)

Als Antwort auf Tim Hunt

Re: Can you set form values at the validation() step?

von David Poly -
You're right that worked. I ended up using data_postprocessing() which works just like get_data().


Thanks for your help Tim.


David