Add columns to be shown

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

Add columns to be shown

Post by iggabz »

i have only allowed six (6) columns to be shown on "/project/TblOneList" page.

is it possible to add columns to be shown (tbl_one list) during this event -> "/project/TblTwoList?showmaster=tbl_one&fk_doc_id=12"


mobhar
User
Posts: 11756

Post by mobhar »

Did you want to add a custom column in the Master table section? You may simply use Custom Templates.

Just click your master table from Database Pane in your PHPMaker project, and then go to: Custom Templates -> Master Record Page -> Custom Template, and then write your code in that section to customize the master record section that suits your needs.


iggabz
User
Posts: 91

Post by iggabz »

already solved.

thank you very much


iggabz
User
Posts: 91

Post by iggabz »

additional query:

can i add jquery to this Custom Templates -> Master Record Page -> Custom Template ???


mobhar
User
Posts: 11756

Post by mobhar »

See Important Notes -> #6.


iggabz
User
Posts: 91

Post by iggabz »

Before the Custom Template is applied, the jQuery event "rendertemplate" will be fired, you can use Client Script of the page (see Server Events and Client Scripts) to subscribe this event and pass custom data to the Custom Template, e.g.

is it referring to client scripts > table specific ???

thank you and sorry for this being noob as i only partially learn thru youtube university.


mobhar
User
Posts: 11756

Post by mobhar »

iggabz wrote:

is it referring to client scripts > table specific ???

Yes, it is.


iggabz
User
Posts: 91

Post by iggabz »

Thank you for this.

about this from customTemplate

    <tr id="r_doc_id">
        <td class="w-col-2">{{{caption doc_id}}}</td>
        <td>{{{value doc_id}}}</td>
    </tr>
    <tr id="r_fname">
        <td class="w-col-2">{{{caption fname}}}</td>
        <td>{{{value fname}}}</td>
    </tr>
    <tr id="r_mname">
        <td class="w-col-2">{{{caption mname}}}</td>
        <td>{{{value mname}}}</td>
    </tr>
    <tr id="r_lname">
        <td class="w-col-2">{{{caption lname}}}</td>
        <td>{{{value lname}}}</td>
    </tr>
    <tr id="r_client_stat">
        <td class="w-col-2">{{{caption client_stat}}}</td>
        <td>{{{value client_stat}}}</td>
    </tr>
    <tr id="r_hh_id">
        <td class="w-col-2">{{{caption hh_id}}}</td>
        <td>{{{value hh_id}}}</td>
    </tr>
</table>

the first 3 <tr> have values since i enable them on the list page. however the 4th and 5th have no value, i have not enable the 4th and 5th on the list page.
how can i show the value on the 4th and 5th <tr> ???


arbei
User
Posts: 9424

Post by arbei »

iggabz wrote:

I have not enable the 4th and 5th on the list page.

That won't work. As the docs says:
Remember that Custom Template is rearrangement of existing HTML fragments in the page, all other code is still the same, the fields in the Custom Template cannot be more than the original script. The available fields are same as the original script, if you try to include other fields in the table or from other table by Custom Template, it will NOT work.


iggabz
User
Posts: 91

Post by iggabz »

oh ok. thank you so much.


Post Reply