This snippet was discovered in the wizard’s chaotic laboratory — an unpolished experiment, conjured to solve a niche challenge. Use at your own risk.
Filename: gppa-lmt-numbers-only-modifier.php
gppa-lmt-numbers-only-modifier.php
<?php /** * Gravity Perks // Populate Anything // Live Merge Tags: Numbers Only Modifier * https://gravitywiz.com/documentation/gravity-forms-populate-anything/ * * Experimental Snippet */ add_filter( 'gppa_live_merge_tag_value', function( $value, $merge_tag, $form, $field_id, $entry_values ) { if ( strpos( $merge_tag, ':numbersonly' ) !== false && preg_match( '/([0-9]+)/', $value, $matches ) ) { $value = $matches[0]; } return $value; }, 10, 5 );
Your email address will not be published. Required fields are marked *
Comment *
Notify me of followup comments via e-mail
Name *
Email *
Website
Save my name, email, and website in this browser for the next time I comment.
By commenting, I understand that I may receive emails related to Gravity Wiz and can unsubscribe at any time.
Δ