Skip to content

gsOnFormItHook

Triggered when the GoogleSheetsSaveForm hook is called.

Available variables:

NameDescription
valuesValues for export

Example:

Convert the date.

php
if ($modx->event->name === 'gsOnFormItHook') {
    if (isset($values['date'])) {
        $values['date'] = date('d-m-Y H:i:s', $values['date']);
    }
    $modx->event->params['values'] = $values;
}

© GoogleSheets 2019-present