Hooks/before_save_form_record

Fires before any database record is saved using its saveForm() method. HTML forms that insert or edit records will cause this hook to fire. This includes both insert and update operations.

Arguments

Omeka_Record $record
The record that is about to be saved.
ArrayObject $post
The submitted POST data from the form.

Notes

  • Since this hook fires before the record is saved, the record ID will not be available for items being added.
  • Changes made to any record properties will be saved in the database automatically.