Trigering function on adding a new row for child table in webform

Any one know how to trigger a function on adding a new row in a child table in webform?

@ram_subba_reddy Please check this. and find {fieldname}_add this event in child table script

its for desk useage. but i want for webform

$('.grid-add-row').on('click', function() {
        // Identify the child table by traversing the DOM
        var childTableWrapper = $(this).closest('.frappe-control[data-fieldname]');
        var childTableName = childTableWrapper.attr('data-fieldname');

        console.log("Row added to child table: " + childTableName);
});

solved with jquery

1 Like