Page 1 of 1
Pass fields from Add page to next Add page
Posted: Sat Apr 13, 2024 2:01 am
by sclg
I have a need to add multiple records where some of the fields don't change often.
So I have an Add page which, after submission, goes back to the same Add page.
How do I make some of the fields default to the entries on the previous Add page?
Thanks
Re: Pass fields from Add page to next Add page
Posted: Sat Apr 13, 2024 10:15 am
by arbei
You may use Row_Inserted server event to save those values in session variables and use Row_Rendered server event to check your session variables and set the value to the EditValue
property of the field (then remove the session variable).
Re: Pass fields from Add page to next Add page
Posted: Sat Apr 13, 2024 7:30 pm
by sclg
Thanks - one outstanding problem though. In Row_Rendered I have
if(!empty($_SESSION["current_tabuser"])) {
$this->membid->EditValue = $_SESSION["current_tabuser"];
$_SESSION["current_tabuser"] = "";
}
This returns the correct member id BUT membid is a lookup field returning the relevant member name into a dropdown field.
How can I use the membid to get the dropdown to display the correct "looked up" name?
Re: Pass fields from Add page to next Add page
Posted: Sat Apr 13, 2024 8:48 pm
by sclg
Sorted it - used CurrentValue instead of EditValue