gppa_ajax_form_field_values (JS)

  1. Description
  2. Usage
  3. Parameters
  4. Examples
    1. Require input to not have smart (curly) quotes, convert it to straight quotes instead.
  5. Since

Description

Filter the AJAX form field values used when dynamically refreshing fields and Live Merge Tags.

Usage

gform.addFilter( 'gppa_ajax_form_field_values', 'my_custom_function' );

Parameters

  • elVal string

    The form field value.

  • elName string

    The form field name.

Examples

Require input to not have smart (curly) quotes, convert it to straight quotes instead.

window.gform.addFilter( 'gppa_ajax_form_field_values', function( elVal, elName ) {
	if ( /[''""″]/.test( elVal ) ) {
		elVal = elVal.replace( /'|’/g, "'" ).replace( /"|"|″/g, '"' );
	}
	return elVal;
} );

Since

This JavaScript filter is available since Gravity Forms Populate Anything 2.1.11