Customview: Add and Edit divert to base table

This public forum is for user-to-user discussions of PHPMaker. Note that this is not support forum.
Post Reply
mpol_ch
User
Posts: 877
Location: Switzerland

Customview: Add and Edit divert to base table

Post by mpol_ch »

Hi
I am using a table with name "invoice". For some calculation I created a custom view (join of 2 Table with Group by function).
The customview table is called invoiceview and it is not editable and addable. Both tables have the same primary key.

How can I switch from invoiceview to invoice table when I click on Add or edit?

Exp: Whenn a click on add in view I want to get the invoiceadd.php table and same for edit and soon.

thanks
mpol_ch


arbei
User
Posts: 9383

Post by arbei »

You can update the link of the edit button in ListOptions_Rendered Server Event.

For example:
$this->ListOptions->Items["edit"]->Body = "<New Button>";

To update the link of the Add button, you can update it in "Page_Renderd" Server Event.

For example:
$this->OtherOptions["addedit"]->Items["add"]->Body = "<New Button>";

You can also just replace the href value in the Body by regular expression.


Post Reply