This topic is locked
[SOLVED]

need advice

11/8/2023 1:47:00 PM
PHPRunner General questions
francesco author

just after saving a record and staying on same page, I want that some fields (not all fields) show last inserted values.Can you give me an idea to start with? thanks

Davor GeciDevClub member 11/8/2023

In After record added event store the value in a session

$_SESSION["last_added_category_name"] = $values["document_category_name"];

img alt

And in the Default Value for this field add $_SESSION["last_added_category_name"]

img alt

Davor GeciDevClub member 11/8/2023

And if you need it to preserve, instead of session store it in a table and retrive it in Default Value (it accepts PHP code)

For example Table structure:

table_name field_name last_value

francesco author 11/9/2023

thank you very much. Does it works also with multiselect fields?

Davor GeciDevClub member 11/9/2023

Regarding multiselect fields, I don't know, didn't try it out.

francesco author 11/9/2023

I confirm it works with multiselect fields. Thanks