【发布时间】:2018-12-19 09:51:23
【问题描述】:
在 Gravity 表单的管理员端,如果管理员用户更改表单条目的状态,我想添加注释。我有一个仅限管理员的字段,因此该位正在工作,并且我知道如何添加注释。
但无法解决,如何仅在更改某个字段时添加注释。我需要它说“状态已由 xxx 更新为“已批准”为“关闭”之类的内容
任何帮助将不胜感激。
谢谢。
add_action( 'gform_after_update_entry', function ( $form, $entry_id ) {
$current_user = wp_get_current_user();
$note = 'status updated from' . $status_from . ' to ' . $status_to . ' by ' . $current_user;
RGFormsModel::add_note( $entry_id, $current_user->ID, $current_user->display_name, $not );
}, 10, 2 );
【问题讨论】:
标签: php gravity-forms-plugin gravityforms