2

Why buttons are not showing in frontend UI Form in Magento2 ? Can anyone help in this.

Code added in employee_form.xml file:

<argument name="data" xsi:type="array">
    <item name="js_config" xsi:type="array">
        <item name="provider" xsi:type="string">employee_form.employee_form_data_source</item>
        <item name="deps" xsi:type="string">employee_form.employee_form_data_source</item>
    </item>
    <item name="label" xsi:type="string" translate="true">Employee Information</item>
    <item name="reverseMetadataMerge" xsi:type="boolean">true</item>
    <item name="config" xsi:type="array">
        <item name="dataScope" xsi:type="string">data</item>
        <item name="namespace" xsi:type="string">employee_form</item>
    </item>
    <item name="template" xsi:type="string">templates/form/collapsible</item>

    <item name="buttons" xsi:type="array">
        <item name="save_and_continue" xsi:type="string">Magedeal\Customui\Block\Buttons\SaveButton</item>
    </item>

</argument>

<settings>
    <buttons>
        <button name="save" class="Magedeal\Customui\Block\Buttons\SaveButton"/>
    </buttons>
    <namespace>employee_form</namespace>
    <dataScope>data</dataScope>
    <deps>
        <dep>employee_form.employee_form_data_source</dep>
    </deps>
</settings>
  • 1
    please add more info in your question. Add codes you tried and or errors you get. In that way others can help you better – magefms Apr 15 at 6:58
  • used code added – Mukesh Apr 15 at 7:09
  • all buttons not working? or only the one inside settings tag? – magefms Apr 15 at 7:13
  • all buttons are missing, none of them are showing. – Mukesh Apr 15 at 7:19
  • add this before </argument> and check <item name="buttons" xsi:type="array"> <item name="save_and_continue" xsi:type="array"> <item name="name" xsi:type="string">save and continue</item> <item name="label" xsi:type="string" translate="true">Save and Continue</item> <item name="class" xsi:type="string">primary</item> <item name="url" xsi:type="string">*/*/save</item> </item> </item> – magefms Apr 15 at 7:26

Your Answer

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

Browse other questions tagged or ask your own question.