Heads up!
This article contains PHP code and is intended for developers. We offer this code as a courtesy, but don't provide support for code customizations or 3rd party development.
This article contains PHP code and is intended for developers. We offer this code as a courtesy, but don't provide support for code customizations or 3rd party development.
Use this hook to determine whether the actions are triggered for an embedded form. By default, actions are not triggered for embedded forms.
Usage
add_filter('frm_use_embedded_form_actions', 'frm_trigger_embedded_form_actions', 10, 2); function frm_trigger_embedded_form_actions( $trigger_actions, $args )
Parameters
- $trigger_actions (boolean)
- $args (array)
- 'form' (object)
- 'entry' (object)
Examples
Trigger actions for all embedded forms
add_filter( 'frm_use_embedded_form_actions', '__return_true' );
Trigger action for a specific embedded form
add_filter('frm_use_embedded_form_actions', 'frm_trigger_embedded_form_actions', 10, 2);
function frm_trigger_embedded_form_actions( $trigger_actions, $args ) {
if ( $args['form']->id == 123 ) {
$trigger_actions = true;
}
return $trigger_actions;
}