bookmark_bordergform_list_post_item_add

Description

This JavaScript hook is fired after a new item is added to a List field.

Usage

gform.addAction( 'gform_list_post_item_add', function ( item, container ) {
    // do stuff
} );

Parameters

Examples

1. Bind Event To List Item Input

This example shows how you can bind a change event to the new list item input.

<script>
gform.addAction( 'gform_list_post_item_add', function ( item, container ) {
    item.find( 'input[type="text"]' ).on( 'change', function() {
        console.log( 'Changed!' );
    } );
} );
</script>

Placement

Your code snippet can be placed in a HTML field on your form or in a theme custom JavaScript file.

Source Code

This filter is located in js/gravityforms.js