Viewing 11 replies - 1 through 11 (of 11 total)
  • Plugin Author ulihake

    (@ulih)

    Hello rafals75.

    You need something like an “accept our terms and conditions” and that this is required at the same time… That’s what you want?

    Regards.
    uh

    Plugin Author ulihake

    (@ulih)

    As there’s no response I close this. I will try to implement something like this within a feature upgrade in the future.

    Regards.
    uh

    Hi, I have this question too.

    I added a custom-field to the Billing section, as a Checkbox. It must be UNCHECKED when the page loads, so the user can check the checkbox manually.

    And the field must be REQUIRED – the user MUST click the checkbox, to submit the form.

    It’s like a terms and conditions field, but in addition to the default one in WooCommerce.

    thanks,
    tz

    Thread Starter rafals75

    (@rafals75)

    Hi uh,

    sorry for no response from my side (too many notifications via e-mail ??

    I need this unchecked checkboxs:
    first for term & condition
    second for acceptance to the processing of personal data for providing the services (req. by our law)

    those checkbox should be required but has to be marked by user

    thanks

    rafal.

    Plugin Author ulihake

    (@ulih)

    Hello tzeldin88.

    Thanks for your feedback. From version 1.8.1 onwards you can implement further customization for site specific needs with javascript.

    WCPGSK has two methods to attach javascript:

    1. You can edit with the WordPress editor for plugins a file with the name wcpgsk_user.js. There you can put your code. The drawback is that your changes will be lost when updating the plugin. For this reason there exists

    2. A textarea within the checkout section where you can put your tested code and store it in the database. This code won’t be lost and will be loaded with the checkout form as well

    You can make your checkbox required and at the same time you can achieve that the checkbox is not checked on load with a code similar to this:

    jQuery(document).ready(function() {
    jQuery('#billing_yourcheckbox_field').find('input[name="billing_yourcheckbox"]').each(function() {
     jQuery(this).prop('checked', false);
    });
    });

    With jQuery you can append your text also. I will implement a dedicated solution for this into the Rich Guys Swiss Knife but with these indications you can achieve this yourself.

    Regards.

    uh

    Hi uh.
    Thank you for such a fast reply. The JS hack worked.. thanks!

    I notice when the checkout page loads, my custom Checkbox field first appears as a select-dropdown, for a second, then changes to a checkbox. What’s happening there? Do i have something configured incorrectly? I’m not sure it’s as elegant as my client will expect.

    Thanks,
    tz

    Plugin Author ulihake

    (@ulih)

    well, that’s something I’m doing, that’s right… There’s only one select type which can be displayed as dropdown, multiple select, checkboxes, radio buttons… the display is configured client side via jquery.

    Regards.
    uh

    Plugin Author ulihake

    (@ulih)

    The next update will allow you to enter an empty value line into the select configuration which won’t convert to a checkbox or radio button, leaving all resulting radio buttons and checkboxes unchecked.

    Regards.
    uh

    That’s excellent, thank you so much, uh.
    Any timeframe on that release?

    Plugin Author ulihake

    (@ulih)

    Hello tzeldin88.

    Probably next weekend.

    Regards.
    uh

    Plugin Author ulihake

    (@ulih)

    1.8.2 is out. It supports the empty value for selects which allows to transform to unchecked checkboxes and radios.

    Regards.
    uh

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Checkbox field’ is closed to new replies.