How we are Integrate the CheckboxToggleNotice in Uicomponent Form

 

How we are Integrate the CheckboxToggleNotice in Uicomponent Form

The CheckboxToggleNotice component implements the Checkbox component with the ability to switch notice according to the selected option.

How we are Integrate the CheckboxToggleNotice in Uicomponent Form - 


<form>

    <fieldset>

        <field name="checkbox_toggle_notice_example_mageget" component="Magento_Ui/js/form/element/single-checkbox-toggle-notice" formElement="checkbox">

            <argument name="data" xsi:type="array">

                <item name="config" xsi:type="array">

                    <item name="default" xsi:type="number">0</item>

                    <item name="notices" xsi:type="array">

                        <item name="0" xsi:type="string" translate="true">Notice #1</item>

                        <item name="1" xsi:type="string" translate="true">Notice #2</item>

                    </item>

                </item>

            </argument>

            <settings>

                <dataType>boolean</dataType>

                <label translate="true">Checkbox Toggle Notice</label>

            </settings>

            <formElements>

                <checkbox>

                    <settings>

                        <valueMap>

                            <map name="false" xsi:type="number">0</map>

                            <map name="true" xsi:type="number">1</map>

                        </valueMap>

                        <prefer>toggle</prefer>

                    </settings>

                </checkbox>

            </formElements>

        </field>

    </fieldset>

</form>


How we are Integrate the CheckboxToggleNotice in Uicomponent Form





Deepak Kumar Bind

Success is peace of mind, which is a direct result of self-satisfaction in knowing you made the effort to become the best of which you are capable.

Post a Comment

If you liked this post please do not forget to leave a comment. Thanks

Previous Post Next Post