Docs & Support

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

frm_after_field_options

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.

Add settings at the bottom of the field options in the sidebar.

Usage

add_action( 'frm_after_field_options', 'add_custom_field_setting' );
function add_custom_field_setting( $args )

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

Parameters

  • $args (array)
    • 'field' (array)
    • 'display' (array): A list of field options that should be shown for the current field.
    • 'values' (array): Details about the form.

Examples

Add custom setting to text field options

add_action( 'frm_after_field_options', 'add_custom_field_options_section' );
function add_custom_field_options_section( $args ) {
	if ( 'text' !== $args['field']['type'] ) {
		return;
	}
	$value = isset( $args['field']['custom_setting'] ) ? $args['field']['custom_setting'] : '';
	?>
	<div class="custom_field_settings">
		<h3 class="frm-collapsed" aria-expanded="false" tabindex="0" role="button" aria-label="Custom settings" aria-controls="collapsible-section">
			<?php
			esc_html_e( 'Custom settings', 'text-domain' );
			FrmAppHelper::icon_by_class( 'frmfont frm_arrowdown6_icon', array( 'aria-hidden' => 'true' ) );
			?>
		</h3>

		<div class="frm_validation_box frm-collapse-me" role="group">
			<p>
				<label>
					Custom setting
					<input type="text" name="field_options[custom_setting_<?php echo intval( $args['field']['id'] ); ?>]" value="<?php echo esc_attr( $value ); ?>" />
				</label>
			</p>
		</div>
	</div>
	<?php
}

add_filter( 'frm_default_field_options', 'add_custom_field_option', 10, 2 );
function add_custom_field_option( $options, $args ) {
	if ( 'text' === $args['type'] ) {
		$options['custom_setting'] = '';
	}
	return $options;
}

Change Log

Added in version 4.0

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 © 2025 Strategy11, LLC. Formidable Forms® is a registered trademark Strategy11, LLC.

    Join 400,000+ using Formidable Forms to create form-focused solutions fast. Get Formidable Forms