Donor Comment Required Issue
-
I used this article (https://givewp.com/documentation/developers/customizing-the-required-donation-form-fields/) to make the donor comments box required. The code below is in my functions.php and it works perfectly.
I have 2 forms. On one form I have the donor comment box enabled but on the other form, I have it disabled. However, when someone fills out the form (link to my page above), an error shows on the page saying “Error: Please enter where you want this donation designated in the comment box. See notice above for details.”
What do I need to adjust in my code below or is there no way around this?
function mycustomprefix_give_form_required_fields( $required_fields ) { //Donor Comment $required_fields['give_comment'] = array( 'error_id' => 'invalid_comment', 'error_message' => __( 'Please enter where you want this donation designated in the comment box. See notice above for details.', 'give' ) ); return $required_fields; } add_filter( 'give_purchase_form_required_fields', 'mycustomprefix_give_form_required_fields' );
thanks.
The page I need help with: [log in to see the link]
- The topic ‘Donor Comment Required Issue’ is closed to new replies.