Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Warning

The XML document must also use UTF-8 format encoding.

Time, Date/Time Controls

Time and Date/Time controls can be initialized in a form with data provided by an XML document. 

Here is an example of XML code that can be used to initialize a form with date, time and date/time controls.  The data will be converted to the timezone of the browser and displayed in the form accordingly if the timezone is provided in the XML document. The "Capital Z" represents the timezone as shown below. Initialization data will not be converted and will display as is on the form if the timezone is not provided.  The time for the date/time control is proceeded by a capital  "T" (Time Zone) and followed by a "Z" (UTC timezone). 

Code Block
<?xml version="1.0" encoding="UTF-8"?>
 <p0:default_format xmlns:p0="http://www.frevvo.com/schemas/_1gjfsLVcEeGncZR5RoaQbQ">
    <date>2012-07-09</date>
    <time>14:00:00Z</time>
    <datetime1>2012-07-09T14:00:00Z</datetime1>
    <datetime2>2012-07-09T14:00:00Z</datetime2>
 </p0:default_format>

See Initializing Forms with Data for more information. 

When
Tip
Warning

You must specify the _formTz=<tz> parameter appended to the share URL when initializing a form with date,  time time or date/time controls using  from an XML init document, the _data , an xml document  or a  Business Rule using parameter or a business rule that uses the rule identifier,form.load, it is best practice to specify the _formTz=<tz> parameter appended to the share URL. Data will display in the form's time zone if the parameter is not supplied. Refer to Initializing Forms with Data for the details.. This is because the form server needs to know the timezone in which to return the date and time. Successful initialization cannot be guaranteed if the &_formTz parameter is not supplied. Refer to Initializing Forms with Data for the details.

For Example: the XML document shown below provides initialization data for the Product Order form via a Doc URI set up by the form designer

Code Block
<p0:form xmlns:p0="http://www.frevvo.com/schemas/_yyePwNgBEeG5s7IL2f0q_g" name="CopyofProductOrderForm">
  <Message14>&lt;center&gt;Best Company&lt;br/&gt;Product Order Form&lt;/center&gt;</Message14>
  <OrderDate>2012-07-17</OrderDate>
  <OrderTime>11:13:00Z</OrderTime>
  </p0:form>

Copying the Product Order share URL, without the &_formTz=<tz> parameter into a browser session will trigger an error message when initialization is attempted using the XML doucment. 


 

 

http://localhost:8082/frevvo/web/tn/rap.com/user/rap/app/_w-eeENIYEeGYrP3vLLbERA/formtype/_yyePwNgBEeG5s7IL2f0q_g/popupform?locale=  

Copying the Product Order share URL, without the &_formTz=<tz> parameter into a browser session will trigger the error message in the image below when initialization is attempted using the XML doucment. 

 

 

Adding the &_formTz=America/New_York to the form URL will display the time on the screen in the America/New_York timezone and guarantee successful initialization:

http://localhost:8082/frevvo/web/tn/rap.com/user/rap/app/_w-eeENIYEeGYrP3vLLbERA/formtype/_yyePwNgBEeG5s7IL2f0q_g/popupform?locale=&_formTz=America/New_York

 See Initializing Forms with Data for more information. 

Time data in a form is always converted from the browser's timezone to a valid UTC format when posted in the form XML document in the submissions database. You may see the time in UTC format with a trailing "Z" (UTC) time or the time value plus or minus the UTC offset. Refer to Viewing XML Documents for more information on the Submissions Database and the XML document. 

 

XML document from Post payload

...