Skip to Main Content
Feature Request FR-2645
Product Area APIs
Status CLOSED

1 Voters

API for page item labels

eric.olson Public
· Jul 15 2022

Idea Summary
A Javascript interface or Dynamic Action options for interacting with page item labels.

Use Case
I occasionally need to modify the labels of page items at run time. Usually this is changing whether or not the label appears as required to the user based on another page item or tweaking the label text. I currently do this by finding the item, walking up the DOM tree to div.t-Form-fieldContainer and adding or removing the is-required class. Similarly, I can change $("label[for='MY_PAGE_ITEM']").get(0).firstChild.nodeValue to alter the text. But I'm always concerned that a future Apex upgrade will break these actions.

Preferred Solution (Optional)
I'm not sure if this would be part of the item interface, or a separate label interface, but something like this: apex.item("MY_PAGE_ITEM").setRequired(true) or .setLabelText("Foo")

This request is likely a duplicate of FR-2469.