Webkul
Services
Technologies Bagisto QloApps
iOS Android SAP BigCommerce Wix
Trusted by
Samsung Intel Toyota Walmart Disney Nokia Nestlé Decathlon
See all customers
Back to Top
DEV

Add Button In Admin Form Magento 2

Add Button In Admin Form Magento 2 : if you want to add a button in admin form. here is a way you can do it. please check below code.

$fieldset->addField(
    'phone_number',
    'text',
    [
        'label' => __('Phone Number'),
        'title' => __('Phone Number'),
        'name' => 'phone_number',
        'after_element_html' => '<button class="primary" type="button">Verify</button>'
    ]
);

It will look like this. Check the below screenshot.

Selection_012

I hope it will help you 😃.

. . .

Leave a Comment

Your email address will not be published. Required fields are marked*


Be the first to comment.

Back to Top

Message Sent!

If you have more details or questions, you can reply to the received confirmation email.

Back to Home