Page 1 of 1

Custom View Tag with foreign key fields

Posted: Tue Aug 09, 2022 7:58 am
by bkonia

When a field on an edit form contains a foreign key value and the form is displayed as the detail form in a master/detail relationship, the field is rendered as readonly. This is fine and expected.

The problem is, if you're using a custom view tag, it ignores the custom view tag, since it's an edit form, not a view form. This results in inconsistent display of the field, when idisplayed on a view form vs readonly on an edit form. It's not practical to use the custom edit tag, since the field may need to be displayed as readonly when it's acting as a foreign key and editable otherwise.

When displaying a foreign key field on an edit form, PHPMaker should treat it as a view field, and format it according to the custom view tag, if one exists.


Re: Custom View Tag with foreign key fields

Posted: Tue Aug 09, 2022 11:27 am
by mobhar

bkonia wrote:

It's not practical to use the custom edit tag, since the field may need to be displayed as readonly when it's acting as a foreign key and editable otherwise.

Custom Edit Tag should be able to handle it, since it is intended for Add/Edit pages.


Re: Custom View Tag with foreign key fields

Posted: Mon Sep 19, 2022 10:17 pm
by bkonia

Right, it should be able to, but currently, it does not handle it properly.