Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Support Kris – WPMU DEV Support

    (@wpmudevsupport13)

    Hi @sumitmistri

    I hope you are doing well today.

    I pinged our SLS Team to review your query and see what will be possible in this case. We will post an update here as soon as more information is available.

    Kind Regards,
    Kris

    Thread Starter sumitmistri

    (@sumitmistri)

    Thank you, I hope the issue is cleared to you. Looking forward to hear from you asap.

    Plugin Support Kris – WPMU DEV Support

    (@wpmudevsupport13)

    Hi again

    You can try this snippet as a mu-plugin:

    add_action( 'wp_footer', 'wpmudev_checkbox_selection_minimum', 9999 );
    function wpmudev_checkbox_selection_minimum() {
        global $post;
        if ( is_a( $post, 'WP_Post' ) && !has_shortcode($post->post_content, 'forminator_form') ) {
            return;
        }
    	?>
    	<script type="text/javascript">
    	jQuery(document).ready(function($){
            setTimeout(function() {
    			$('.forminator-custom-form').trigger('after.load.forminator');
    		},100);
    
    		$(document).on('after.load.forminator', function(e, form_id) {
                if ( e.target.id == 'forminator-module-6' ) { // Please change the form ID.
                    var checkboxes = {'checkbox-1': 2, 'checkbox-2': 2}; // Please match the field IDs.
                    $.each(checkboxes, function(index, item) {
                        $("#"+index+ ' input').attr( "minlength", item );
                    });
                }
            });
        });
        </script>
        <?php
    }

    You can find more information below on how to use mu-plugins.
    https://wpmudev.com/docs/using-wordpress/installing-wordpress-plugins/#installing-mu-plugins

    Kind Regards,
    Kris

    Thread Starter sumitmistri

    (@sumitmistri)

    Thank you, it worked like a charm.

    Two more issues which I want to solve are as follows:

    1. In Specialization field we can select multiple. The issue is when I am trying to make that field “required”. Then it says like “options are must have values”. But when I check in the options, those are having already values. And without selecting the default option, I am not able to apply “required” for the Specialization field. Screenshot – https://prnt.sc/pzXk-Lst047r
    2. Another thing I want to do is, On select of an option is specialization an another form will appear in popup or in the same area. Do you have any easy way to achieve that?
    Thread Starter sumitmistri

    (@sumitmistri)

    Do you have any update?

    Plugin Support Nithin – WPMU DEV Support

    (@wpmudevsupport11)

    Hi @sumitmistri,

    Sorry for the delay regarding this, it appears we didn’t get a notification for newer replies and hence missed the thread. Sorry about that.

    In?Specialization field?we can select multiple. The issue is when I am trying to make that field “required”. Then it says like “options are must have values”. But when I check in the options, those are having already values. And without selecting the default option, I am not able to apply “required” for the?Specialization?field. Screenshot –?https://prnt.sc/pzXk-Lst047r

    If I understood your query, the issue is with the validation text that changes when checkbox is marked as required, right? Or do you face more issues?

    Another thing I want to do is, On select of an option is specialization an another form will appear in popup or in the same area. Do you have any easy way to achieve that?

    You meant to load a popup when one specific field in the checkbox is checked? I’m afraid, there isn’t any such feature supported on the plugin side.

    I’ll have to check with our developer to see if there is any workaround that could be suggested, however, the above workflow can interfere with how the existing snippet works, so please do confirm the 1st query so that we can determine whether it’s possible or not.

    Looking forward to your resopnse.

    Kind Regards,

    Nithin

    Plugin Support Dmytro – WPMU DEV Support

    (@wpmudevsupport16)

    Hello @sumitmistri,

    I hope you’re doing great today!

    We haven’t heard back from you for some time. If you still need our assistance, could you please address the above questions by Nithin, so that we can check it further with the developers.

    Best Regards,
    Dmytro

    Plugin Support Williams – WPMU DEV Support

    (@wpmudev-support8)

    Hi @sumitmistri

    Since we didn’t hear back from you, I’m marking this as resolved.

    If you have any other questions or need other support, don’t hesitate to create new topics and we’ll be happy to assist.

    Best regards,
    Adam

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘User should select at least two checkbox in field’ is closed to new replies.