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

Hi Lars,





I've tested the script, which works for you and determined that it does not work for me.


Yet, I noticed that you used textContent - so, I decided to use it also in my script. It works!



Here is how my script looks like now:



Answer1.png



And the result:


Answer2.png




So, Lars, thank you very much! You were really useful here!


Without your last update - I would not be able to complete my goal!



(handshake)




@ Arka, Shloke, thank you also for trying to assist me!




NOTE: I am not sure why, but document.getElement does not work on my instance;




Best Regards,


Georgi Mavrodiev



IT Consultant


Do IT Wise



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


Great that it works for you.



Please remember to mark the question as correct, so others can see that your question was answered.


shloke04
Kilo Patron

Hi,



Write an On Load Client Script for that particular Record producer as below:



document.getElementById('submit_button').innerHTML='New Button Name';




Please mark the answer as correct/helpful based on impact.



Regards,


Shloke


Hope this helps. Please mark the answer as correct/helpful based on impact.

Regards,
Shloke