How do I prevent Lookup Table Display Fields from showing in the View Tag for a field?
In the PHPMaker 2024 version of the project they didn't show in the View Tag but I'm updating the project to PHPMaker 2025 (hopefully 2026 soon) and they do show in the View Tag which isn't wanted for my application.
Hi yes, the View Tag, as in how the field is displayed when viewed in Lists etc.
For example I have the field ItemID in the QuoteDetails table.
I want the user adding/editing the ItemID to be able to find an ItemID in the lookup table with the Display Fields shown so they have an actual item description to look at instead of just an item number.
Then once the user saves it and it is viewed in lists etc it needs to just show the ItemID without the extra Display Fields attached to the end of it.
I used Option Template to format what is displayed in the lookup table.
So according to the docs I should be able to set the DisplayValueSeparator as empty in the server events for pages I don't want these Display Fields to show like so:
Page_Load
// Don't show lookup display fields for ItemID
$this->ItemID->DisplayValueSeparator = [];
I put the code on every page but it still shows the Display Fields on the Master/Detail Page even when I put it in Detail Grid Page->ListOptions_Load.
So instead I went to Field Setup for the ItemID field -> View Tag -> Custom View Tag and just put in {{{value}}}. This seems to work but I'm unsure why DisplayValueSeparator doesn't as I remember it used to work for me before.
Did you mean you use Master/Detail-View page and the data is in the detail table? If so, you can try the Table_Load server event for the detail table. (Note that the Table_Load event applies to all pages.)