Docs & Support

Learn about all the Formidable features and get support from our amazing customer success team.

frm_after_form_action_logic_row

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 third-party development.

Use the frm_after_form_action_logic_row action to add your own settings to each condition in a form action's conditional logic. Your inputs appear at the end of the condition row, before the Remove link.

Each setting is saved with that condition when you save the form's settings.

Requirements

  • Formidable Forms Pro 7.0 or later.

Formidable Forms makes advanced site building simple. Launch forms, directories, dashboards, and custom WordPress apps faster than ever before.

Usage

add_action( 'frm_after_form_action_logic_row', 'my_after_form_action_logic_row', 10, 3 );

Parameters

  • $names (array): The input names used in this condition row.
    • 'hide_field' (string): The name of the field dropdown, such as 'frm_email_action[12][post_content][conditions][0][hide_field]'.
    • 'hide_field_cond' (string): The name of the comparison dropdown (equals, contains, and so on).
    • 'hide_opt' (string): The name of the value input.
  • $condition (array): The saved values for this condition, including 'hide_field', 'hide_field_cond', 'hide_opt', and any settings you add.
  • $id (string): The HTML ID of the condition row.

Name your inputs

To save a setting with the condition, give your input the same name as the condition's other inputs, ending in your own key. Start with $names['hide_field'] and remove [hide_field] from the end. Then add [your_key] in its place. After you save, the value comes back in $condition['your_key'].

The action runs for the conditions of every form action type. The start of each name shows the type, such as frm_email_action for an email action. To add your setting to a single action type, check this part of the name.

Examples

Learn where to put the code when adding a custom PHP function to your site.

Add a note to each email condition

This example adds a text box to each condition in an email action. You can use it to record why the condition exists. The note is saved with the condition and has no effect on when the email is sent.

add_action( 'frm_after_form_action_logic_row', 'my_condition_note', 10, 3 );
function my_condition_note( $names, $condition, $id ) {
	$suffix = '[hide_field]';

	if ( empty( $names['hide_field'] ) || 0 !== strpos( $names['hide_field'], 'frm_email_action[' ) ) {
		return;
	}

	if ( substr( $names['hide_field'], -strlen( $suffix ) ) !== $suffix ) {
		return;
	}

	$note_name = substr( $names['hide_field'], 0, -strlen( $suffix ) ) . '[my_note]';
	$note      = isset( $condition['my_note'] ) && is_string( $condition['my_note'] ) ? $condition['my_note'] : '';

	printf(
		'<p class="frm12 frm_form_field"><input type="text" name="%1$s" value="%2$s" placeholder="%3$s" /></p>',
		esc_attr( $note_name ),
		esc_attr( $note ),
		esc_attr__( 'Note about this condition', 'my-text-domain' )
	);
}

Limitations

  • The action only adds settings to the screen. Your own code decides what each setting does. For example, the frm_action_logic_value hook changes the value a condition checks.
  • The action doesn't run for field conditional logic on the form builder. It's only used for form action conditions.
Was this article helpful? *

This article may contain affiliate links. Once in a while, we earn commissions from those links. But we only recommend products we like, with or without commissions.

In this article

    We have a small, but amazing team of dedicated people who are committed to helping you achieve your goals and project requirements.


    Copyright © 2026 Strategy11, LLC. Formidable Forms® is a registered trademark Strategy11, LLC.

    Complete your purchase
    Don't forget your purchase!
    Complete Purchase
    Join 400,000+ using Formidable Forms to create form-focused solutions fast. Get Formidable Forms