This topic is locked
[SOLVED]

Change Button Label in Change Field Event

11/11/2024 1:57:53 PM
PHPRunner General questions
A
asawyer13 authorDevClub member

I want to change the add button label in one of my Field Events Change.

The id of the button is add_save.

So in the ClientAfter I tried

$("a[id^=addButton]").text('Check Out');

and also

$("a[id^=add_save]").text('Check Out');

but neither seems to work.

What am I doing wrong?

Thanks
Alan

A
asawyer13 authorDevClub member 11/12/2024

Got it.

Even though in PHPR the id is add_new in the generated app it's called saveButton1.

I changed to that and it works.

Alan

Sergey Kornilov admin 11/12/2024

You are confusing ItemID with id that appears in the HTML. Two different things. ItemID is to be used in PHPRunner API, ID that appears in HTML can be used with jQuery functions.