Skip to content

Commit 962ac87

Browse files
authored
gpmpn-enable-page-query-param-for-specific-form.php: Added new snippet.
1 parent 70d90e4 commit 962ac87

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<?php
2+
/**
3+
* Gravity Perks // Multi-page Navigation // Enable Page Query Parameter for Specific Form
4+
* https://gravitywiz.com/documentation/gravity-forms-multi-page-navigation/
5+
*
6+
* Typically, the `gpmpn_page` query parameter, which allows you to set the default starting page for a form, is only
7+
* enabled if you are using the `page` attribute on the [gravityforms] shortcode. This snippet will enable it by default
8+
* for a specific form. This is useful if you are displaying the form via a block.
9+
*/
10+
// Update "123" to your form ID.
11+
add_filter( 'gpmpn_default_page_123', function() {
12+
return rgget( 'gpmpn_page' );
13+
} );

0 commit comments

Comments
 (0)