Page 1 of 1

Custom Template (Mobile View)

Posted: Mon Dec 05, 2022 9:23 pm
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?


Re: CUSTOM TEMPLATE ISSUES(MOBILE VIEW) V2023

Posted: Tue Dec 06, 2022 12:10 am
by mobhar

You may post your Custom Template code for more discussion.


Re: CUSTOM TEMPLATE ISSUES(MOBILE VIEW) V2023

Posted: Tue Dec 06, 2022 4:25 pm
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?


Re: Custom Template (Mobile View)

Posted: Tue Dec 06, 2022 6:47 pm
by mobhar

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


Re: Custom Template (Mobile View)

Posted: Thu Mar 02, 2023 7:03 pm
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 ;-)