Making changes to the Ebase template html code

Post any questions you have about using the Verj.io Studio, including client and server-side programming with Javascript or FPL, and integration with databases, web services etc.

Moderators: Jon, Steve, Ian, Dave

neilnewman
Ebase User
Posts: 201
Joined: Fri Dec 20, 2013 1:29 pm
Location: Dartford Borough Council
Contact:

Making changes to the Ebase template html code

#1

Postby neilnewman » Tue Mar 01, 2016 11:35 am

If I create a new form and set the "Html Document type" to "html 5", then I look at the source code for the form I see the code below.
Where is this code held and how can I amend it.
I am trying to make our web forms html 5 compliant, however the form begins with an empty "title" tag and I would like to also amend other parts of this code.
I also note that even though I have select html 5 the page appears to begin by stating that the page is "xhtml".

Anyone with any ideas please.

NB: I have removed the initial '<from>
html xmlns="http://www.w3.org/1999/xhtml" lang="EN">
!--
Powered by Ebase
www.ebasetech.com
-->
head>
meta content="text/html" http-equiv="Content-Type"/>
title>/title>
style type="text/css">
!--
img {
border:none;;
}
.spacer8 {
padding-left:8px;
}
.spacer4 {
padding-left:4px;
}
@page {
size:A4 portrait;;
;
@top-left{ content: element(eb-PAGE_1top-left) };
@bottom-left{ content: element(eb-PAGE_1bottom-left) };
}
.eb-0-Body {
width:100%;;
}
.eb-0-BodyTable {
border-collapse:collapse;width:100%;border-width:0px;
}
tr {
padding:0px;margin:0px;;
}
td {
padding:0px;margin:0px;;
}
.eb-0-FormHeader {
font-family:Verdana, Arial, Helvetica, sans-serif;;
font-size:1em;;
color:#404040;;
font-weight:bold;;
}
.eb-0-Contents {
font-family:Verdana, Arial, Helvetica, sans-serif;;
font-size:0.8em;;
color:#404040;;
}
-->
/style>
style type="text/css" id="eb-pss-overrides">
!--
-->
/style>
/head>
body class="eb-0-Body " style=";margin: 10px 10px 0px 10px">
div class="CTID-0-_ ">table id="eb_all" class="eb-0-BodyTable " summary="">
tr>
td id="eb_main" valign="top">

div class="eb-0-FormHeader eb-0-FormHeaderTable ">&lt;no&nbsp;form&nbsp;header&nbsp;set&gt;
/div>div class="eb-0-Contents ">



/div>/td>
/tr>
/table>
/div>/body>
/html>
0 x

Jon
Moderator
Moderator
Posts: 1342
Joined: Wed Sep 12, 2007 12:49 pm

#2

Postby Jon » Tue Mar 01, 2016 2:25 pm

You should set the form type to "HTML 5" in Form Properties > Presentation tab. At the moment you have "XHTML 1". This can be specified for each form and there is also a global default (in UFSSetup.properties in V4).

You specify a title for a form using Form Properties > Texts > HTML Title text. This then appears at the top of the browser or on the browser tab containing the form.
0 x

neilnewman
Ebase User
Posts: 201
Joined: Fri Dec 20, 2013 1:29 pm
Location: Dartford Borough Council
Contact:

#3

Postby neilnewman » Thu Mar 03, 2016 3:50 pm

Hi Jon,
Many thanks for the reply.
The title text works fine.

When I change the presentation type to html 5 under the forms presentation tab and look at the source of the form it tells me that it is still xhtml.
The form was originally set to use the "system default".
I have taken a look at the UFSSetup.properties file but cannot see where the global default is being set.
0 x

Jon
Moderator
Moderator
Posts: 1342
Joined: Wed Sep 12, 2007 12:49 pm

#4

Postby Jon » Thu Mar 03, 2016 4:22 pm

That doesn't sound right. Which version of Ebase are you using?
0 x

neilnewman
Ebase User
Posts: 201
Joined: Fri Dec 20, 2013 1:29 pm
Location: Dartford Borough Council
Contact:

#5

Postby neilnewman » Fri Mar 04, 2016 8:33 am

We are running with 4.5.4 build 20160610
0 x

Jon
Moderator
Moderator
Posts: 1342
Joined: Wed Sep 12, 2007 12:49 pm

#6

Postby Jon » Fri Mar 04, 2016 9:35 am

This works fine on my V4.5.4 system, both when the document type is obtained from the system default (see below) and when it's overridden in form properties. This is what you should see:

With document type set to XHTML1, the first two lines of the HTML page are:

Code: Select all

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http&#58;//www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http&#58;//www.w3.org/1999/xhtml" lang="EN">
When set to HTML5:

Code: Select all

<!DOCTYPE html>
<html lang="EN">
When set to HTML4 transitional:

Code: Select all

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http&#58;//www.w3.org/TR/html4/loose.dtd">
<html lang="EN">
The system default is parameter Ufs.outputDocumentType in UFSSetup.properties (in tomcat/webapps/ufs/WEB-INF/classes). This accepts values:
  • HTML4_TRANS
    HTML4_STRCT
    HTML5
    XHTM1_TRANS
    XHTM1_STRCT
This defaults to HTML4 Transitional if not specified.
0 x

neilnewman
Ebase User
Posts: 201
Joined: Fri Dec 20, 2013 1:29 pm
Location: Dartford Borough Council
Contact:

#7

Postby neilnewman » Fri Mar 04, 2016 10:12 am

Thanks for the pointers Jon, I now have it working.
Many thanks Neil
0 x


Who is online

Users browsing this forum: No registered users and 17 guests