Page 1 of 1

Change edit button

Posted: Fri Mar 17, 2023 11:58 am
by mishanian

Hi,
how can I overwrite the edit button behaviour on PHPMaker 2023?
Is this correct because it is not working with the error: Attempt to assign property "Body" on null

function ListOptions_Rendered() {
  $this->OtherOptions["action"]["edit"]->Body = "<button id=\"PayButton\"> Pay</button>";
}

Re: Change edit button

Posted: Fri Mar 17, 2023 12:04 pm
by mobhar

Re: Change edit button

Posted: Fri Mar 17, 2023 12:09 pm
by mishanian

Thanks, actually I did copy it from the same topic

is ListOptions_Rendered() the correct function?

I got this error:
Attempt to assign property "Body" on null


Re: Change edit button

Posted: Fri Mar 17, 2023 12:13 pm
by mishanian

I tried

function ListOptions_Rendered() {
  $this->ListOptions["edit"]->Body="test";
}

but same error


Re: Change edit button

Posted: Fri Mar 17, 2023 12:22 pm
by mobhar

If you follow the discussion in the other thread, you should be able to handle the situation correctly.


Re: Change edit button

Posted: Fri Mar 17, 2023 12:27 pm
by mishanian

Sure, thank you

Another question,

Update Selected Record button is "edit" or "multiedit" or something else?


Re: Change edit button

Posted: Fri Mar 17, 2023 12:55 pm
by arbei

It is Multi-Edit.