DB Actions

KAS will automatically submit forms, Table live Fields, Live Forms or regular Form Views and execute the pre-programmed database actions: Insert, Update, Delete, etc. But there are ways to do other actions before or after a Query is executed.

Ordinary KAS forms use automatic KAS_FORM submission through db_actions. Use the owning project theme's native hooks only when additional validated behavior is needed.

// Locations resolved through kas_root(), for the active KAS theme:
// themes/$theme/delete_actions.php
// themes/$theme/update_actions.php
// themes/$theme/db_actions.php

With the default KAS directory these resolve under kas/themes, not the public-site themes tree. The existing delete/update hooks run before native pre-actions and query construction; the theme db_actions hook runs after the native database/domain action flow. Inspect the actual action and owning handler before extending it.

Authorize rows, validate the complete operation and stop with the native error contract when validation fails. Hook presence alone does not choose a database action, and a theme hook cannot assume that a generic write is transactional. Reuse existing extension points rather than copying the Core save pipeline into a new endpoint.