Pass fields from Add page to next Add page

This public forum is for user-to-user discussions of PHPMaker. Note that this is not support forum.
Post Reply
sclg
User
Posts: 149
Location: UK

Pass fields from Add page to next Add page

Post 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


arbei
User
Posts: 9390

Post 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).


sclg
User
Posts: 149
Location: UK

Post 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?


sclg
User
Posts: 149
Location: UK

Post by sclg »

Sorted it - used CurrentValue instead of EditValue


Post Reply