Home / Admin / Recurring Addon Extension: Adding placeholder for custom recurring donations
Duplicate Snippet

Embed Snippet on Your Site

Recurring Addon Extension: Adding placeholder for custom recurring donations

Edit the custom text box that allows users to input custom donations for recurring donations (only).

Code Preview
php
<?php
/* 
 * This will work only for Charitable Recurring Donations 1.4.0.4+
 * This accepts the HTML of the text box and with a little fancy replacing, allow you to add attributes.
 */ 
add_filter( 'charitable_recurring_custom_amount_input', 'test_charitable_recurring_custom_amount_input', 10, 4 );
function test_charitable_recurring_custom_amount_input( $html_input_text, $campaign, $amount, $form_id ) {
	$html_input_text = str_replace( 'type=', 'placeholder="Enter amount"', $html_input_text );
	return $html_input_text;
}

Comments

Add a Comment