I have created button on UI form:

        <button name="save">
            <url path="*/*/save"/>
            <label translate="true">Save</label>
        <button name="back">
            <url path="*/*/"/>
            <label translate="true">Back</label>
        <button name="send_mail" class="Vendor\ModuleName\Block\Adminhtml\Edit\Button\SendMail"/>


Button Data

 public function getButtonData()
    $data = [];
    if ($this->canshow()) {
        $data = [
            'label' => __('Send Mail'),
            'class' => 'save',
            'on_click' => sprintf("location.href = '%s';", $this->getButtonUrl()),

            'sort_order' => 80,
    return $data;

But I can't get all post params when going to action Sendmail. Also, that button can't validate. Any help will be accept.

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.