Contact Form 7 with Custom Radio/Checkbox in Bootstrap 4.0.0 a6

var $items = $('.wpcf7-list-item'); $items.each(function() { var $label = $(this).children('label'), $input = $label.children('input'), $indct = $('<span class="custom-control-indicator"></span>'), $desc = $label.children('.wpcf7-list-item-label'); var type = $input.attr('type'); $label.addClass('custom-control custom-'+type); $input.addClass('custom-control-input'); $desc.addClass('custom-control-description'); $input.after($indct); });
Just modify radio/checkbox that generated by Contact Form 7 (WordPress) to use same structure as Bootstrap 4.0.0 alpha 6

Bootstrap 4 documents: https://v4-alpha.getbootstrap.com/components/forms/#checkboxes-and-radios-1
Contact Form 7 plugin: https://wordpress.org/plugins/contact-form-7/

Be the first to comment

You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.