• I have a gravity form with a nested form in it, I want to run a javascript function on adding and editing and entry, is there a way to add onclick attribute using hooks? or any other methods.

    some similar codes I’ve found,
    this adds custom class:

    add_filter( 'gpnf_template_args', function( $args ) {
    	if ( $args['template'] === 'nested-entries' ) {
    		$append_classes     = 'class-a class-b';
    		$args['add_button'] = str_replace( 'gpnf-add-entry', 'gpnf-add-entry ' . $append_classes, $args['add_button'] );
    	}
    	return $args;
    } );

    and this allows to customize the text:

    is there a way to combine these to run a javascript function on click?

    • This topic was modified 3 years, 9 months ago by Jan Dembowski.
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)

The topic ‘Run JavaScript on Gravity form button click’ is closed to new replies.