Docs & Support

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

frm_range_end_field_synced_settings

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_range_end_field_synced_settings filter to choose which settings the end field of a date or time range copies from its start field. The 2 fields of a range describe a single choice, so some settings belong to the pair. You change them on the start field, and the end field takes them from there.

Requirements

  • Formidable Forms Pro 7.0 or later.
  • A Date field with Date Range turned on, or a Time field with Time Range turned on.

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

Usage

add_filter( 'frm_range_end_field_synced_settings', 'my_range_end_field_synced_settings', 10, 2 );

Parameters

  • $settings (array): The field option names the end field copies. 'required' stands for the field's Required setting. By default, the list is:
    • Date and Time ranges: 'required', 'unique', 'read_only' and 'admin_only' (the field's Visibility setting).
    • Date ranges also: 'start_year' and 'end_year' (the year range).
    • Time ranges also: 'linked_date_field'.
  • $field_type (string): The type of the range, 'date' or 'time'.

When the settings are copied

The end field copies each setting in the list in 2 cases:

  • When the end field is created.
  • Each time the form is saved. The end field then takes the values the start field was saved with.

The form builder also keeps the default settings in step while you edit, and locks them on the end field. Settings you add with this filter aren't locked or kept in step in the builder. They're copied when the form is saved.

Examples

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

Share the Required message in every range

This example makes the end field use the start field's Required message, found under Validation Messages in the field options. The option name for that message is 'blank'.

add_filter( 'frm_range_end_field_synced_settings', 'my_sync_required_message', 10, 2 );
function my_sync_required_message( $settings, $field_type ) {
	$settings[] = 'blank';

	return $settings;
}

Share the Unique message in date ranges only

This example adds the start field's Unique message ('unique_msg') to date ranges only. Time ranges keep the default list.

add_filter( 'frm_range_end_field_synced_settings', 'my_sync_unique_message', 10, 2 );
function my_sync_unique_message( $settings, $field_type ) {
	if ( 'date' === $field_type ) {
		$settings[] = 'unique_msg';
	}

	return $settings;
}

Limitations

  • A copied setting replaces the end field's own value when the form is saved. Any change made on the end field is overwritten.
  • Removing a default setting from the list stops it from being copied on save. The form builder still keeps it in step and locks it on the end field.
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