This topic is locked

show master record on add/edit pages

2/7/2011 2:00:23 PM
PHPRunner General questions
G
globiws author

In a normal master/detail relationship, the master record is shown in the list page of the detail table.
How can I display the master record when adding / editing / viewing a record?
Thanks in advance.

-Andreas

G
globiws author 2/7/2011

I tried editing the add.htm template by inserting the master record code from the lheader.htm page, but this didn't seem to work. I added the following between {header} and {BEGIN flybody}:

if @TABLE.arrMasterTables.len##

{BEGIN mastertable_block}

<div id="mastertable_block{$id}">

{$showmasterfile}

<a {$backtomasterlink_attrs} class="toplinks"><b>##message BACK_TO## {$backtomasterlink_caption}</b></a>



</div>



{END mastertable_block}

endif##



Any suggestions?

P
procheck 2/7/2011

I'm not really sure what you're trying to do.

Your questions was "How can I display the master record when adding / editing / viewing a record?".

You can edit (inline edit) from the list page. Is what you want?

G
globiws author 2/7/2011

Sorry if I wasn't clear earlier.
On the add/edit/delete pages, I would like to show the master record above the detail fields (just like it displays above the detail list on the list page).
Thanks,

-Andreas

T
trek46 2/8/2011

I was looking at the manual and found this topic I think you might want to read.