how to display view page without row caption

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

how to display view page without row caption

Post by dilistimor »

Dear Fellows,

As subject above, I would like to eliminate row caption in view page, here is the scenario:

  1. There is a table with 8 cols
  2. Set up only 3 cols show in list page
  3. List page has search icon on the left of each row to display a view page of the record
  4. The view page displayed in 2 cols. One for row header/caption and the other for record/data (in vertical order)

Question:
Is there a way to set view page to only show the record in vertical order without row caption

Thanks in advanced


mobhar
User
Posts: 11700

Post by mobhar »

Simply use jQuery code in Startup Script of View Page to hide the Label elements.


dilistimor
User
Posts: 27

Post by dilistimor »

I did it like this

<div>
    <div style="row">
    {{news_abc}}
    </div>
    <div style="row">
    {{news_xyz}}
    </div>
</div>

did not change anything


mobhar
User
Posts: 11700

Post by mobhar »

You cannot use such code in Startup Script.


dilistimor
User
Posts: 27

Post by dilistimor »

At server event>client script>table-specific>view page> startup script

I put this code

$this-><field A>->caption->show = false;
$this-><field B>->caption->show = false;

mobhar
User
Posts: 11700

Post by mobhar »

Your code is wrong and cannot be used in Startup Script. Besides, that is not jQuery code.


dilistimor
User
Posts: 27

Post by dilistimor »

this one also did not work

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

(version 2023)


mobhar
User
Posts: 11700

Post by mobhar »

To hide Label element in View Page, you may simply use this code in Startup Script section:

// for example: orderdetails table and Discount field name
$("#elh_orderdetails_Discount").hide();

dilistimor
User
Posts: 27

Post by dilistimor »

Finally it works. Thanks for kind solution.

I wondering where can I learn those code or CSS or any other things that manners to the PHPMaker development?


mobhar
User
Posts: 11700

Post by mobhar »

This topic can be used as a basic concept: Inspect HTML element and add your own CSS styles.

For jQuery code, you may refer to its documentation to help you to implement it in Startup Script.


Post Reply