General developer forum

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

 
Tim at Lone Pine Koala Sanctuary
Re: Can you set form values at the validation() step?
Core developersDocumentation writersParticularly helpful MoodlersPlugin 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.)

 
Average of ratings: -
Picture of David Poly
Re: Can you set form values at the validation() step?
 
You're right that worked. I ended up using data_postprocessing() which works just like get_data().


Thanks for your help Tim.


David

 
Average of ratings: -