• Resolved s

    (@sdnazdi)


    Hi, I am thinking it may be more of ux if you could add an option (that is somewhere in ‘Labels’ tab or ‘Setting’ tab near ‘layout’ or ‘require’ and can be enabled/disabled) when one define more than one option in checkbox field, and this option is one checkbox at the beginning/end of all checkbox in frontend such that by checking it all options are checked by one click or uncheck all options if one uncheck that checkbox. this checkbox can have ‘check/uncheck all’ or any other custom label.

    if it is vague, please let me know to explain more.

    thanks

    • This topic was modified 3 months ago by s.
    • This topic was modified 3 months ago by s.
Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Support Amin – WPMU DEV Support

    (@wpmudev-support2)

    Hello @sdnazdi

    I hope you are doing well today.

    I couldn’t find any similar feature requests so will bring your idea to our forminator team’s attention, and we may be able to provide a custom code snippet so you can implement it quickly and consider adding it as a new feature in the next plugin updates.

    We will get back to you once we have further updates.

    Best Regards,
    Amin

    Thread Starter s

    (@sdnazdi)

    I attached some photos, I hope they are useful. I think this is specially useful when there are many checkbox and one person decided to choose all/none of the selections.

    https://ibb.co/2hd3YrC
    https://ibb.co/x1SC6dL
    https://ibb.co/f2Dq0GH suggestion
    https://ibb.co/zbRTrqt
    https://ibb.co/9Gg1RK6 suggestion
    https://ibb.co/RQVS802
    https://ibb.co/pWxQqGP suggestion

    PS. I also think the label for check uncheck could be custom (like Error messages which have a default text as well as possibility to add custom text for Error), so that the form creator can write anything he/she wants for label (good also for non English forms)

    https://ibb.co/6RH3QM7 suggestion







    • This reply was modified 3 months ago by s.
    • This reply was modified 3 months ago by s.
    • This reply was modified 3 months ago by s.
    • This reply was modified 3 months ago by s.
    • This reply was modified 3 months ago by s.
    • This reply was modified 3 months ago by s.
    • This reply was modified 3 months ago by s.
    • This reply was modified 3 months ago by s.
    • This reply was modified 3 months ago by s.
    Plugin Support Zafer – WPMU DEV Support

    (@wpmudevsupport15)

    Hi @sdnazdi,

    I hope you are doing well today!

    We have an update from our developers. You can use the following code snippet as mu-plugin.

    <?php
    add_action( 'wp_footer', 'wpmudev_checkbox_selection_custom', 9999 );
    function wpmudev_checkbox_selection_custom() {
    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(event, form_id) {
    if ( event.target.id = 'forminator-module-6' ) {
    $('#checkbox-1 input').on('change', function() {
    if ( $(this).val() == 'Select-All' ) { //Please change the checkbox option value
    $('#checkbox-1 input').not(this).prop('checked', true);
    }

    if ( $(this).val() == 'Select-All' && ! $(this).is(':checked') ) { //Please change the checkbox option value
    $('#checkbox-1 input').not(this).prop('checked', false);
    }
    });
    }
    });
    });
    </script>
    <?php
    }

    Please create the first checkbox option with the label Select All and change the form ID 6 and checkbox field’s ID #checkbox-1 in the code

    You can find more information below on how to use mu-plugins.
    https://wpmudev.com/docs/using-wordpress/installing-wordpress-plugins/#installing-mu-plugins
    and
    https://www.ads-software.com/support/article/must-use-plugins/

    It would be better to test this out on your staging/dev environment first before your live site and make sure you have the latest backups.

    Kind regards,
    Zafer

    Plugin Support Nithin – WPMU DEV Support

    (@wpmudevsupport11)

    Hi @sdnazdi,

    Since we haven’t heard from you for a while. I’ll mark this thread as resolved for now. Please feel free to re-open this thread if you need any further assistance.

    Kind Regards
    Nithin

Viewing 4 replies - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.