I Love PHPMaker

... because it gets even more powerful and flexible!!

  • About
  • Terms and Conditions
  • Membership Options
  • Sitemap
  • Downloads
    • PHPMaker Extensions Download
    • PHPMaker Projects Download
    • PHP Report Maker Extensions Download
I Love PHPMaker » Tips and Trick » A Case Study: Hiding the Master Fields in Master/Detail Pages of Websites that Generated by PHPMaker 9.2.0
How to Disable Select Box on the Edit Pages in Websites that Generated by PHPMaker 9.2.0
A Case Study: Hiding Certain Fields Based on the Selected Value in ComboBox in Add Pages of the Websites that Generated by PHPMaker 9.2.0

May 10, 2013

A Case Study: Hiding the Master Fields in Master/Detail Pages of Websites that Generated by PHPMaker 9.2.0

PHPMaker generates the Master/Detail pages by including the *master.php file into the generated List page that belongs to the detail table. For example, the master table is orders, and the detail table is orderdetails and both tables have already been associated as Master/Detail in Table setup of PHPMaker. So, in the generated orderdetailslist.php file, you will see the code which includes ordersmaster.php inside that orderdetailslist.php file (using PHP include_once command).

In addition, there is no Server Events provided in PHPMaker, thus we cannot customize the fields in the Master section of that Master/Detail pages by using Server Events as well as the normal List pages. Even we cannot use the Server Events that belongs to the master table itself in order to hide the fields by assigning the Visible property of the field become FALSE, since the master section in the detail list page uses PHP include_once command.

On the other side, I recently wanted to hide or customize the certain fields in the Master section that located at the top of the Master/Detail pages. To overcome this issue, now I will show you how we can hide the fields in the Master section of that Master/Detail pages. We will not customize any generated script files for this. We will write a little of jQuery code in the Client Scripts section of PHPMaker.

[hidepost]

  1. Run your PHPMaker project (.pmp) file using PHPMaker.
  2. Go to Tools -> Advanced Settings and then make sure you have already given a checked mark at the Local YUI/jQuery files. I recommend this setting, especially if your web application will not connect to the Internet to use the live YUI/jQuery files.
  3. From the example above, click on orderdetails table in the Database pane in the left side of your PHPMaker. In other words, we will customize from the detail table side, not from the master table side.
  4. Let' say we want to hide a field named status that located at the Master section in that Master/Detail page. To do this, go to the Client Scripts -> Table-Specific -> List Page -> Startup Script, then insert the following code:

    $(document).ready(function(){
      $('#r_status').hide();
    });
    

    As you can see from the code above, the ID of status field is generated by PHPMaker by adding the prefix r_ since it is a TR (Table Row) tag of the Master table section in the Master/Detail page. Please note that this trick will not affected to the Master/Detail Export pages. In other words, the status field at the Master section will be displayed (won't be hidden).

  5. Finally, re-generate your script files using PHPMaker as always.

[/hidepost]

Article by Masino Sinaga / Tips and Trick / Client Scripts, detail table, master table, master-detail, PHPMaker 9.2.0, Startup Script 2 Comments

How to Disable Select Box on the Edit Pages in Websites that Generated by PHPMaker 9.2.0
A Case Study: Hiding Certain Fields Based on the Selected Value in ComboBox in Add Pages of the Websites that Generated by PHPMaker 9.2.0

Comments

  1. Anthony Percivalle says

    October 19, 2015 at 1:54 pm

    Trying to hide an entire column , what would be the way to do that? I cant seem to find any info on that.

    Log in to Reply
    • Masino Sinaga says

      October 19, 2015 at 2:22 pm

      This article is related to PHPMaker version 9 only. Are you sure you are using that version, too? If not, then this may not work in the latest version of PHPMaker.

      Log in to Reply

Leave a Reply Cancel reply

You must be logged in to post a comment.

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Recent Posts

  • A New PHPMaker 2021 Project File Is Released
  • PHPMaker 2021 Demo Project File Is Released
  • Masino Extensions for PHPMaker 2021 Is Released!
  • A New PHPMaker 2020 Project File Is Released
  • PHPMaker 2020 Demo Project File Is Released
  • Masino Extensions for PHPMaker 2020 Is Released!
  • Inventory Stock Management Project, Why Should You Have It?
  • A New PHPMaker 2019 Project File Is Released!
  • PHPMaker 2019 Demo Project File Is Released!
  • Masino Extensions for PHPMaker 2019 Is Released!

Search

Recent Comments

  • saleh alayafi on A Case Study: Hiding Certain Fields Based on the Selected Value in ComboBox in Add Pages of the Websites that Generated by PHPMaker 9.2.0
  • Masino Sinaga on A Case Study: Hiding Certain Fields Based on the Selected Value in ComboBox in Add Pages of the Websites that Generated by PHPMaker 9.2.0
  • saleh alayafi on A Case Study: Hiding Certain Fields Based on the Selected Value in ComboBox in Add Pages of the Websites that Generated by PHPMaker 9.2.0
  • Masino Sinaga on A Case Study: Hiding Certain Fields Based on the Selected Value in ComboBox in Add Pages of the Websites that Generated by PHPMaker 9.2.0
  • Masino Sinaga on A Case Study: Hiding Certain Fields Based on the Selected Value in ComboBox in Add Pages of the Websites that Generated by PHPMaker 9.2.0

Demo Website

  • Demo of I Love PHPMaker 2021 (MasinoExtensions).
  • Indonesia Post Offices.
  • Stock Inventory Management.
  • Demo of PHPMaker + PHP Report Maker

Another Demo

The following template are not available in this site (must be purchased separately)

  • PHPMaker v2018 Horizontal Vertical Template.
  • PHPMaker v2017 Horizontal Vertical Template.

Demo Explanation

Stock Inventory Management is the good project for your reference, since it uses the real example in the real world. Many useful features you can use from this project, such as how to add the Thousand and Decimal separator character, and also how to calculate multiple row in Grid-Add when End-Users are entering data into the Grid-Add mode.

Categories

  • Customize Template (103)
  • General (3)
  • PHP Report Maker (17)
  • PHP Report Maker Extensions (2)
  • PHPMaker Extensions (79)
  • Tips and Trick (72)

Articles based on version

  • PHPMaker 2021
  • PHPMaker 2020
  • PHPMaker 2019
  • PHPMaker 2018
  • PHPMaker 2017.0.7
  • PHPMaker 12.0.7
  • PHPMaker 11.0.6
  • PHPMaker 10.0.5
  • PHPMaker 9.2.0
  • PHPMaker 8.0.3
  • PHP Report Maker 12

(c) I Love PHPMaker 2010 - 2019 by Masino Sinaga | WordPress | Log in | Back to top