Change Value with JS/Jquery WordPress

I build a form on a WordPress Website with a Pagebuilder Plugin. I want to change the value=”submit” to something else. This is how the code looks when I look inside with Chrome Dev Tools. –>

 <p class="input-submit full-size">
            <span class="input-row">
                <span class="submit-wrap">
                    <input class="input-required" type="submit" name="form-submit" value="Submit">
                </span>
            </span>
        </p>

Sadly there is no Option inside the Pagebuilder to change it so I need Javascript I guess. Can you guys help me how to change the value? I cant select an ID, since there is none. I tried some stuff but without success –>

if( body.hasClass("page-id-2383") ) {

    $(".submit").val("New Value");
}

or

document.querySelectorAll("input[value=submit]").value  = "New Value";

Read more here: Change Value with JS/Jquery WordPress

Leave a Reply

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