Docs & Support

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

frm_filter_view

The frm_filter_view hook allows you to modify any part of the View object before the View is rendered.

Usage

add_filter( 'frm_filter_view', 'change_my_view_object', 10, 1);

Parameters

  • $view (object)

Examples

Change View order based on URL parameter

Use the following code to change a View's order when a specific URL parameter and value are set. Replace 123 with the ID of your View, replace my_param with your parameter name, replace custom_value with your specific parameter value, and replace 150 with the ID of the field you want to order by.

add_filter( 'frm_filter_view', 'change_my_view_object', 10, 1);
function change_my_view_object( $view ) {
	if ( $view->ID === 123 ) {
		if ( isset( $_GET['my_param'] ) && $_GET['my_param'] == 'custom_value' ) {
			$view->frm_order_by = array( 150 );
			$view->frm_order = array( 'DESC' );
		}
	}

	return $view;
}

Change Log

Added in version 2.02.13

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.

    Complete your purchase
    Special offer unlocked.
    Get 55% OFF!
    Complete Purchase
    Join 400,000+ using Formidable Forms to create form-focused solutions fast. Get Formidable Forms