I need to set validation and required fields in an Add template for my Database activity. I looked for any documentation for a Javascript template to accomplish this, but only found this WIki that didn't have many details: http://docs.moodle.org/20/en/Database_templates. Is there any documentation out there, with some examples, that would be helpful? My Javascript is pretty rudimentary, so some pointers, especially in regards to templates for the Database activity, would be greatly appreciated.
Also, I need to customize the Excel output to order the fields in the way my client would like them, as he needs to drop the resulting output into a purchase order for our textbook supplier. The fewer steps he needs to do this, the fewer headaches for me. Could someone point me in the direction of the script that handles export to Excel format so I can see if this is a simple enough task for me? Eventually, I'd like to write a script to just render and email a purchase order to the supplier, and save our account manager some work, but first things first.