Viewing 4 replies - 1 through 4 (of 4 total)
  • mother.of.code

    (@imazed)

    The Mother of Code

    Hi Codingowl,

    Thank you for your kind words! It’s so nice to hear you enjoy our hard work 🙂

    If you want to make a checkbox required, just add required to the input field like so:

    <input type="checkbox" required>

    Does that answer your question fully or would you like some more info? I’m not quite sure on what you intend to do; if you elaborate a little more, I might be able to give you a more specific answer.

    Thread Starter Codingowl

    (@codingowl)

    Thanks

    Yes on the form it is no problem, but like I said, it is about the automatic output in the form of Easy Digital Downloads.

    Plugin Author Danny van Kooten

    (@dvankooten)

    Hi Codingowl,

    I realise I’m far too late with my reply here (probably too late) but I just wanted to get back to this in case you or others are still in need of an answer. Since version 3.0, this is possible using the following code.

    add_filter( 'mc4wp_integration_easy-digital-downloads_checkbox_attributes', function( $attributes ) {
    	$attributes['required'] = 'required';
    	return $attributes;
    });

    Hope that helps. If not, let me know!

    Thread Starter Codingowl

    (@codingowl)

    Hi Danny!

    Not at all to late! Thanks, this works really great!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Make checkbox required’ is closed to new replies.