Add Call-To-Action around existing submit button in drupal


We have a Drupal form we are trying to use and embed the Call-To-Action code around the Submit button. Below is the code we used for the call to action. The issue is that at first it would just remove the original button for the Hubspot button that was created. However, the issue with that is that it wasn’t tied to the required fields for the form, so you could just keep submitting without ever filling in the parameters. I tried to tinker with the code below some to no avail, and when returned it back to the state it was below, it will now not show the submit button at all.

function micfo_form_webform_client_form_1025_alter(&$form, &$form_state, $form_id) {
$form[‘actions’][‘submit’][’#prefix’] = ‘’;
$form[‘actions’][‘submit’][’#suffix’] = ’


Hi @joncoleman,

Just to make sure that we’re on the same page, are you trying to replace an HTML form’s submit button with a HubSpot CTA? Or is this a HubSpot form?


I was hoping to maintain the current forms button and just wrap it with the HubSpot CTA. If that is not possible, then next best thing is to replace the HTML form’s submit button with the HubSpot CTA. Does that make sense. Essentially, I would like to replace the form’s button, but maintain the graphic effects and look of our current button.