1

Is there a way to remove a checkbox label from above?

enter image description here

I looked into documentation, but i didn't find any similar example.

2

You need to Remove lable item from your code

Remove below Line :

<item name="label" xsi:type="string">Checkbox Field</item>

Below is Complete code :

<item name="checkbox_field" xsi:type="array">
                    <item name="component" xsi:type="string">Magento_Ui/js/form/element/boolean</item>
                    <item name="config" xsi:type="array">
                        <!--customScope is used to group elements within a single form (e.g. they can be validated separately)-->
                        <item name="customScope" xsi:type="string">customCheckoutForm</item>
                        <item name="template" xsi:type="string">ui/form/field</item>
                        <item name="elementTmpl" xsi:type="string">ui/form/element/checkbox</item>
                    </item>
                    <item name="provider" xsi:type="string">checkoutProvider</item>
                    <item name="dataScope" xsi:type="string">customCheckoutForm.checkbox_field</item>
                    <item name="sortOrder" xsi:type="string">3</item>
                </item>
  • Than both labels are gore and only checkbox is there. Is there a way to remove only one of them? – Slobodanka Jovicic Nov 17 '16 at 12:43
1

Use this "description" instead of "label"
"label":

<item name="label">I accept the Terms of Use and Privacy Policy</item>


"description":

<item name="description" xsi:type="string">I accept the Terms of Use and Privacy Policy</item>

preference: https://github.com/magento/magento2/issues/12125

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.