-
-
Save gspice/eca9b89ca654ff2fe956de710175dbad to your computer and use it in GitHub Desktop.
Make the Commens block field required in GiveWP forms
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_action('givewp_donation_form_schema', function($form) { | |
$comment = $form->getNodeByName('comment'); | |
// if the comment field is not found, return | |
if (!$comment) { | |
return; | |
} | |
// require field | |
$comment->required(true); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment