This topic is locked

ProcessValuesEdit - changes in $values[] are not propagated to BeforeShow .. and html output

12/15/2021 2:35:32 PM
PHPRunner General questions
C
ckranich authorDevClub member

Hi All,

Aim:
Need to modify some field labels due to specual characters in mySQL are interpreted wrongly (although UTF-8 defined on all sides...)

Effect:
All changes made in $values are ignored for display (unchanged field information shown).
Same code worked for LIST and VIEW. Only EDIT does not work.
Even an assign of static text $values["FIELD1"] = 'hello'; does not work.
(even as a variable dump in same event handler shows $values have been changed)

Looks like:
$values is only changed locally (like a local variable in function)

Kind Greetings,

ckranich

C
ckranich authorDevClub member 12/15/2021

Additional Info:

I instantiate Form Objects in OnPageLoad Event like

var ctrlFIELD1 = Runner.getControl(pageid, 'FIELD1');
(to switch some fields to mandatory based on contents)

=> looks as if THIS wipes out any changes made in past Events.
(If I alter anything in this Event, it propagates to output)

Sergey Kornilov admin 12/15/2021

This definitely works in our tests. See below:

img alt

C
ckranich authorDevClub member 12/15/2021

Dear Admin,

Thx for quick reply!
(and your good example)

This is definitively what I have done!
(here it doesn't work; maybee I try this out with a cleanroom testproject...)

I am still using PHPrunner 10.5.36478 Enterprise here.
Not yet pulled this project to 10.6. - will give it a try.

Kind Regards,

ckranich