Custom Action; Custom Success Message

I am trying to customize the success message displayed when a form is submitted. I am using the code $form->set_result([ 'action' => 'my_custom_action', 'type' => 'success', 'message' => 'Download your links here: <a href="'.$download_link.'">'.$download_link.'</a>' ]) but it still shows the default success message. If I echo dynamic data, the only thing that shows up is the green success box without any text. Can anyone help me figure out how to display my custom message?