Master Detail (Remove one of the add buttons)

This public forum is for user-to-user discussions of PHPMaker. Note that this is not support forum.
Post Reply
JoeB7774
User
Posts: 76

Master Detail (Remove one of the add buttons)

Post by JoeB7774 »

Hello,

I have a master table with two detail tables attached to it. When i use the menu on the left hand side and click the master table, I get two "add" buttons. One is to add a record to the master table and the other add button is to add a master detail recrod. Is there any way to just have the "add master/detail" button? The reason being is that when I click the button to add a record to the master table, the detail tables don't show up. They only show up when I click the "add master/detail". I always want the detail tables to show up.

In table set up I have 'Multiple Detail Tables' checked on the master table. On the detail tables I have "Master/Detail Add, Master/Detail Edit, and Master/Detail View" checked.


dsingh
User
Posts: 166

Post by dsingh »

try using client side i.e jquery

Put below code in Table Specific->List Page - Startup Script

$("[data-table='Your_Master_Table']").hide();

Note: Replace Your_Master_Table with your actual master table.


dsingh
User
Posts: 166

Post by dsingh »

Another Option: using server side

in Table-Specific-> List Page-> Page_Render
paste the below code:-

$this->OtherOptions["addedit"]->Items["add"]->Visible = FALSE;


JoeB7774
User
Posts: 76

Post by JoeB7774 »

Worked great. Thanks for the help.


Post Reply