Page 1 of 1
how to display view page without row caption
Posted: Thu May 25, 2023 7:27 am
by dilistimor
Dear Fellows,
As subject above, I would like to eliminate row caption in view page, here is the scenario:
- There is a table with 8 cols
- Set up only 3 cols show in list page
- List page has search icon on the left of each row to display a view page of the record
- 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
Re: how to display view page page without row caption
Posted: Thu May 25, 2023 8:32 am
by mobhar
Simply use jQuery code in Startup Script of View Page to hide the Label elements.
Re: how to display view page page without row caption
Posted: Thu May 25, 2023 8:41 am
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
Re: how to display view page page without row caption
Posted: Thu May 25, 2023 8:42 am
by mobhar
You cannot use such code in Startup Script.
Re: how to display view page page without row caption
Posted: Thu May 25, 2023 9:02 am
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;
Re: how to display view page page without row caption
Posted: Thu May 25, 2023 9:06 am
by mobhar
Your code is wrong and cannot be used in Startup Script. Besides, that is not jQuery code.
Re: how to display view page page without row caption
Posted: Thu May 25, 2023 9:22 am
by dilistimor
this one also did not work
$(document).ready(function() {
$('.ewCaption').hide();
});
(version 2023)
Re: how to display view page page without row caption
Posted: Thu May 25, 2023 10:51 am
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();
Re: how to display view page page without row caption
Posted: Thu May 25, 2023 11:36 am
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?
Re: how to display view page page without row caption
Posted: Thu May 25, 2023 3:29 pm
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.