Can't add additional attributes to submit button


I am trying to add additional attributes to the submit button. It says that we can add it through jquery but every time I inspect the element, it doesn’t show that it’s working. I tried the example they gave us of:

portalId: ‘’,
formId: ‘’,
onFormSubmit: function($form) {
$(“input[type=submit]”).attr(“data-target”, “#confirmation”).change();

it does not change the value of the first name. I’m trying to add more attributes but it doesn’t seem to be recognizing any of them no matter where I try to add it.


A few things to test here
Are you sure you want to make the change on submit? Perhaps you mean to use the “onFormReady” callback instead of “onFormSubmit”.

It might be better if you target the form specifically in the scope of your embed code.


change to:


To help you debug better, try this code, and be sure your first name field is actually name=“firstname”

portalId: '',
formId: '',
onFormReady: function($form) {

If the above code works, then start to sprinkle in the rest of your code