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 {{#if
| (optional)}}
The record that is about to be saved.
{{#if: | Default: {{{default}}}}}
ArrayObject $post {{#if
| (optional)}}
The submitted POST data from the form.
{{#if: | Default: {{{default}}}}}

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.