• Resolved hatschiii

    (@hatschiii)


    Within the comments section the checkbox & text is placed wrong within my template

    How can I move the location? How do I find your code which is placing the checkbox.

    Please see the screen, left is like now and right like it should be.

    http://funbox.i24.cc/15-05-_2018_11-51-48.png

Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter hatschiii

    (@hatschiii)

    Was searching arround for days and now I found it by myself 🙂

    plugins/wp-gdpr-compliance/Includes/Extensions/WP.php

    Changed:

        public function addField($submitField = '') {
            $field = apply_filters(
                'wpgdprc_wordpress_field',
                '<p class="wpgdprc-checkbox"><label><input type="checkbox" name="wpgdprc" id="wpgdprc" value="1" /> ' . Integration::getCheckboxText(self::ID) . ' <abbr class="required" title="' . esc_attr__('required', WP_GDPR_C_SLUG) . '">*</abbr></label></p>',
                $submitField
            );
            return $field . $submitField;

    To:

        public function addField($submitField = '') {
            $field = apply_filters(
                'wpgdprc_wordpress_field',
                '<p class="wpgdprc-checkbox"><label style="padding-top:0px;">Privacy<span style="color: #ff0000;"> *</span></label>
                <input type="checkbox" name="wpgdprc" id="wpgdprc" value="1" /> ' . Integration::getCheckboxText(self::ID) . '
                </p>',
                $submitField

    As you see I excluded the “input type” part out of the lable section and added a text within the lable section (not needed if you dont want a lable). I also deleted the abbr part.

    • This reply was modified 8 years ago by hatschiii.
    Donny Oexman

    (@donnyoexman)

    This is a problem with your theme styling. Contact your theme developer for any help.

    If you’d like to change the output of the checkboxes you should use the filter added to the function you mentioned, otherwise you will lose your changes whenever the plugin is updated.

    add_filter('wpgdprc_wordpress_field', 'change_output');
    function change_output($output = '') {
        // Do something here.
        return $output;
    }
    Thread Starter hatschiii

    (@hatschiii)

    I still see the issue on your site.

    Wordpress uses by default 2 columns. Like you see in the picture is the first colum for the lable and the second column for the content

    You placed your content (the check box and the text) within the lable column and not in the content column where it should be… and this is what I did with my change! So you should change it in your plugin within the next update that it is correct.

    Thread Starter hatschiii

    (@hatschiii)

    So this is my final change…

        public function addField($submitField = '') {
            $field = apply_filters(
                'wpgdprc_wordpress_field',
                '<p class="wpgdprc-checkbox"><label style="padding-top:0px;">Privacy<span style="color: #ff0000;"> *</span></label>
                <input type="checkbox" name="wpgdprc" id="wpgdprc" value="1" /> ' . Integration::getCheckboxText(self::ID) . '
                </p>',
                $submitField
            );
            return $field . $submitField;
        }

    And it looks like this: http://funbox.i24.cc/16-05-_2018_21-00-16.png
    (I added the borders to show you the both areas)

    Thread Starter hatschiii

    (@hatschiii)

    Where do I need to add the filter like you described and what’s needed inthe “do it something section”? I’m not a programmer at all and juust reaching my limit.

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Move checkbox location’ is closed to new replies.