Custom Field Type: Special - Web Page View

From SmartWiki
(Redirected from Web Page View)
Jump to: navigation, search

General Description

A Web Page View field is used to create a “document” based on underlying entity data. The field type has a wide variety of document management options associated including the conversion to PDF.

Field Illustrated

Field Options

All common options:
General Settings
Permissions & Availability
Classic Options
For further information, please refer to Custom Fields – General Information.

Options listed below are specific to this particular field type (if applicable).

  • HTML Template – the body of the document combined with variables from the underlying entity. The content of this field should conform to any Accessibility legislation.
  • SmartFields Sample Template - this link adds the SmartFields HTML template. This template renders custom fields in a format that can be easily reviewed, converted to PDF and printed.
  • Custom Field Ids: See Custom Field IDs for instructions.

Document Options

General Options

  • Open in Modal Window - displays the document in a Modal Window.
  • Enable Printing – adds a print button that uses your browser's built-in print functionality to print the screen. Instead of using this setting, we suggest you use the SmartFields HTML template and enable Export as PDF, followed by printing from the PDF.
  • Enable Editing – adds an edit button that allows the user to temporarily edit the HTML of the web page view. Any changes made are not saved.
  • Enable Switching Language - adds a Language dropdown to the modal window which allows the user to switch the language of your web page view. Language translations for custom fields will display when you change the drop down. The languages that appear in the drop down are dependent on the translations you have entered for the web page view field: Cf-wpv-3.png
  • Render As XML Document – indicates that the document is to be prepared as an XML output.
  • Default User ID as File Name - when using the PDF or HTML Save to Multiple File Field options (explained below) the filename of the file stored within the Multiple Files field will be named with the userid of the current user. See also the File Name PDF option below.
    Note: if a file with that name already exists in the Multiple Files field it will be replaced with the new one, unless the Keep Version setting is enabled on the Multiple Files field.
  • Enable HCAI - See HCAI Overview for additional information.
  • HCAI Automatically Redirect - See HCAI Overview for additional information.
  • Enable Field Selection for SmartFields - select a subset of fields to appear on the Web Page View.
  • Hide Instructions - instructions found in custom field captions as well as the display - Instructions custom field will not appear in the exported PDF if this setting is toggled on.

PDF Options

  • Open Directly as PDF - this setting automatically exports the web page view to PDF format. This eliminates the step of loading the web page view in a modal window and clicking export to PDF.
  • Enable Online Signature - enables the online signature feature to be applied to the document.
  • Enable Password Protection – this setting is used in conjunction with the PDF settings of Enable Email as Attachment and Save to Server. If this setting is toggled on and the user clicks Email as PDF or Save To Server as PDF, then the user will be prompted to enter a password that will lock the PDF. The Password the user entered will be required to open the PDF generated and emailed or saved to server.
  • Enable Email as Attachment – enables the user to send the PDF as an attachment to an email message.
  • Enable Export – adds an Export as DOCX button to the modal window, that allows the user to save a local copy of the web page view content in a Word document. Note formatting will not be maintained and some field types may not render as expected.
  • Enable Save to server – enables the user to save the document as a PDF into any multiple file type fields in the related entity.


PDF Page Options

  • Fit to Page - Compresses the content to fit onto one PDF page.
  • Landscape Mode - allows the PDF to be presented in Landscape mode, as opposed to Portait mode.

Paper Size

  • Letter - the standard 8.5 x 11-inch size.
  • Legal - 8 x 13 inches.
  • Ledger - 11 x 17 inches.
  • A4 - 297 millimetres x 210 millimetres.

Maximum Page Length

  • Specifies the maximum number of pages of the resultant PDF permitted to be stored into a Multiple Files field if the Save to Server setting is enabled. This includes pages attached using ssattach. If the PDF document is too long it will not be stored.

HTML Options

  • Enable Email as Attachment – enables the user to send the document as the body of an email message.
  • Enable Save to Server – enables the user to save the document as a HTML document into any multiple file type fields in the related entity.
  • Enable Export – enables the user to save a local copy of the HTML document.

Word Options

  • Enable Export – will expose Export as DOCX button, that allows the user to save a local copy of the Word document.

Exported File Name

  • Specify a filename to be used if the user chooses to export.

Value Storage

  • Value Storage: Enables linking two different custom fields to the same user data. See Value Stores To page.
  • Enforce Selection - makes the Multiple Files custom field selected as the Value Storage field the only field the file can be stored to.



Notes

sslogicWeb Page View fields can use a unique SmartSimple logic interpreter. Web page logic gives you the ability to display certain content or perform certain actions only when specified conditions are met. SmartSimple logic follows the following template:

<!--@sslogic(CONDITION)-->
 The content to be displayed when condition is true
                   
 
<!--@end-->

See SSLogic for further details.

Hyperlink to Web Page View You can create a link to a web page view field using the following syntax:

<a href="@wpv.value@">Open WPV</a>

Where wpv is the name of the Web Page View field.

Multi-Line Text

To include Multi-Line Text fields in a Web Page View you need use the following syntax to ensure that line breaks are displayed correctly when the page is converted to PDF format.

~Narrative~
~Narrative~

The first div displays correctly in the Web Page View and the second div displays correctly in the PDF version

See Also