bookmark_bordergform_field_added

Description

This filter fires after a form field is added.

Usage

<script type="text/javascript">
    jQuery(document).bind( 'gform_field_added', function( event, form, field ) {
        if( form['id'] == 44 ) {
            // do something specific to this form and field
            alert( "Your new field id is: " + field['id'] );
        }
    } );
</script>

Parameters

  • event Event Object

    Default JS event object.

  • form

    The current form object.

  • field Field Object

    The current field object.

Examples

This example uses the gform_admin_pre_render filter to load the hook. A message is displayed when the form id is 44 and new fields are added.

add_action( ‘gform_admin_pre_render’, ‘pre_render_function’ );
function pre_render_function( $form ) {
?>

Source Code

This filter is located in “form_editor.js”