Custom Template (Mobile View)

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

Custom Template (Mobile View)

Post by Niijimasama »

Hi All,

I have a simple issue. (v2023)

Whenever I create a custom template for an add page, 2 divs with the class "ew-add-div" are generated hence the form becomes.
If I uncheck the "use tablular form for desktop" option , the issue occurs on desktop as well.
The content appears on the 2nd "add div" leaving a huge chunk of space above it.
Any hints on how this can be resolved?


mobhar
User
Posts: 11700

Post by mobhar »

You may post your Custom Template code for more discussion.


Niijimasama
User
Posts: 85

Post by Niijimasama »

Here is a sample of an add/page custom template:

<div class="row">
    <div class="col-12">
        {{{source}}}
    </div>
</div>
<div class="row">
    <div class="col-12">
        {{{destination}}}
    </div>
</div>
<div class="row">
    <div class="col-12">
        {{{delivery_date_time}}}
    </div>
</div>
<div class="row">
    <div class="col-6">
        {{{req_type}}}
    </div>
    <div class="col-6">
        {{{del_status}}}
    </div>
</div>
<div class="row">
    <div class="col-6">
        {{{distance}}}
    </div>
    <div class="col-6">
        {{{cost}}}
    </div>
</div>

What is it that I am missing?


mobhar
User
Posts: 11700

Post by mobhar »

You may inspect HTML element and add your own CSS styles to adjust the layout of your Custom Template layout.


Patrak
User
Posts: 1

Post by Patrak »

Hi, I have the same problem with custom template. It's not a HTML element or layout problem

I resolved it by adding this code in Clients Scripts/Global/Pages with header/footer/Startup Script :

/**
 * Write your global startup script here, no need to add script tags.
 * Note: JAVASCRIPT ONLY. DO NOT mix PHP and JavaScript.
 */

$(document).ready(function() {
if ($( ".ew-custom-template" ) && $( ".ew-custom-template" ).length ) 
{
if ($( ".ew-add-div" ) && $( ".ew-add-div" ).length ) 
 $('.ew-add-div').hide();
}
});

Hope this helps ;-)


Post Reply