ZodiacPress

Change The “Submit” Button Text

Since ZodiacPress version 1.6, you can change the text on the form’s Submit button. By default, the button says, “Submit”.

This filter changes the button text to “See Your Report”.

You can change See Your Report on line 8 to your desired text.

/**
 * Change the form submit button text
 */
add_filter( 'zp_form_submit_text', 'my_zp_form_submit_text', 10, 2 );

function my_zp_form_submit_text( $text, $args ) {

	return __( 'See Your Report', 'textdomain' );

}

Variation – Different Button Text For House Systems Report

If you want the Birth Report form’s submit button to have one text, and you want the House Systems Report submit button to have a different text, then use the following.

Line 7 – Change See Your Report to your desired text for the submit button on the Birth Report form.

Line 11 – Change See Your Houses to your desired text for the submit button on the House Systems form.

add_filter( 'zp_form_submit_text', 'my_zp_form_submit_text', 10, 2 );

function my_zp_form_submit_text( $text, $args ) {

	if ( 'birthreport' === $args['report'] ) {

		$text = __( 'See Your Report', 'textdomain' );

	} elseif ( 'house_systems' === $args['report'] ) {
		
		$text = __( 'See Your Houses', 'textdomain' );

	}

	return $text;

}

Ask a Question

Your email address will not be published.