How to translate / change the name of the Submit button of my Record Producer Preview Item(form)?

georgimavrodiev
Mega Guru

Hello,

I would like to know how I can translate or change the name of the Submit button of a record producer, by using an onLoad Catalog Client Script?
I created such against the Catalog item of the record producer of mine, and added the below code into the script:

SubmitScript.png

Via it, I can manipulate the color, fontFamily, fontSize and even the visibility (displaying) of the Submit button.

Yet, I cannot find a way to change its name.


If I go to the Preview Item of the record producer and use the 'Developer tools', I see the following piece of code responsible for the Submit button:

Submit1.png

If I change the name there, after 'data-original-title' -> I can change the name of the button into the form:

Submit2.png

Here is the result:
Submit3.png

Yet, I cannot achieve the same in the onLoad Catalog Client script of mine, as I am not sure how to formulate it: submit_button.style.???='Not Submit' (for example)

May someone advise me about the correct code? Thank you!

Best Regards,

Georgi Mavrodiev

IT Consultant

Do IT Wise

You may visit us in our Web Site: www.doitwise.com

1 ACCEPTED SOLUTION

hi



This works for me



var button = document.getElementById('submit_button');


button.textContent = "Not submit";


View solution in original post

7 REPLIES 7

larstange
Mega Sage

hi



You should be able to change the "innerHTML" via jquery



$("submit_button").html("Not Submit");


ark6
Mega Guru

Try this



document.getElementById('submit_button').name="not submit".



Note: Using DOM manipulation is not recommended, so use a try catch statement.


Hi Lars and Arka,




Thank you for sharing these advises with me!



I've tried both the suggestions, but the result is the same - the name does not get changed.




Best Regards,
Georgi Mavrodiev


hi



This works for me



var button = document.getElementById('submit_button');


button.textContent = "Not submit";