Change the label of the Post button

MiY
Tera Contributor

I want to change the label of the Post button at the bottom of the Work notes journal field. Where can I set it?

5 REPLIES 5

Imran Ali5
Tera Contributor

The Post button in the Work notes field is no longer controlled by a visible or editable.
Instead, it's rendered dynamically by the platform's internal components, especially in the Now Experience UI or Workspace environments.

Even if you want to Manipulate it you can do so through DOM-Manipulation.
write onLoad Client Script with following script

setTimeout(function() {
  document.querySelectorAll('button').forEach(function(btn) {
    if (btn.innerText.trim() === 'Post') {
      btn.innerText = 'Submit Note'; // Change this to your desired label
    }
  });
}, 1000); // Delay to ensure DOM is loaded


Mark helpful anyhow it helps you 😊

SuyashJ41731830
Tera Contributor

Hi 
@MiY 


Option 1: Customize the UI Macro (Advanced, Preferred Method)

The "Post" button in journal fields like Work Notes is rendered by a UI Macro, typically journal_input.

Steps:

  1. Navigate to System UI > UI Macros.

  2. Search for the macro: journal_input.

  3. Make a copy of it (recommended) and name it something like journal_input_custom.

  4. Modify the label "Post" to whatever you want inside the macro:

    <button class="btn btn-default" ...>${gs.getMessage("Your Label Here")}</button>
    5. Override the default macro by using your custom macro in your form via a UI Policy or by modifying the dictionary entry of the Work Notes field (not trivial).

    Option 2: Use a Client Script to Change the Button Text (Quick and Dirty)

    If you're okay with a UI-only (cosmetic) solution:

    1. Create a Catalog Client Script or Client Script depending on the use case.

    2. Script example:

      function changePostButtonLabel() {
      let interval = setInterval(function () {
      var buttons = document.querySelectorAll("button");
      buttons.forEach(function (btn) {
      if (btn.textContent.trim() === "Post") {
      btn.textContent = "Submit Note"; // Your new label
      clearInterval(interval);
      }
      });
      }, 500);
      }

      changePostButtonLabel();


      Be cautious: This is not upgrade-safe or reliable long-term.




    If my response helped please mark it correct
    Thanks, and Regards,
    Suyash


Ankur Bawiskar
Tera Patron
Tera Patron

@MiY 

without DOM manipulation it's not possible.

Note: DOM manipulation is not recommended practice

Something like this

1) Ensure "Isolate Script" field is set as False

2) if this field is not on form then make it False from list

function onLoad() {
    //Type appropriate comment here, and begin script below

    var element = this.document.getElementsByClassName('btn btn-default activity-submit');
    element[0].innerHTML = 'Post Custom';

}

AnkurBawiskar_0-1747893461080.png

 

Output:

AnkurBawiskar_1-1747893513299.png

 

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader

@MiY 

Hope you are doing good.

Did my reply answer your question?

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader