Special control type custom fields add specialized behavior or presentation to a SmartSimple page instead of capturing simple typed data. Some run a script, some render a configurable button that opens another page, and some assemble entity data into a formatted document. Each special control type custom field behaves differently in edit mode and view mode.
Who: Global administrators
When to Use Special Control Type Custom Fields
Use special control type custom fields when:
- A Special - Browser Script custom field fits a page that needs custom JavaScript to run when the page loads, is saved, or a button is clicked.
- A Special - Button custom field fits a record that needs a configurable button to open another page in the same window, a new tab, or a modal window.
- A Special - MSWord Merge custom field fits a record that needs a Word document generated from a template, such as several versions of a document created from the same data.
- A Special - Web Page View custom field fits content that must be assembled from entity data into a document that can be printed, exported, saved, or converted to PDF.
How Special Control Types Work
Special control type custom fields are selected from the Field Type list when a custom field is created. Unlike common input type custom fields, they do not simply store a typed value. Instead, each adds a specific behavior or display to the page where the custom field is located.
A Special - Browser Script custom field adds JavaScript to the page and runs it in coordination with the page or with server-side System Calls. A Special - Button custom field renders a button that opens a target page in the same window, a new tab, or a modal window. A Special - MSWord Merge custom field adds SmartSimple data to a Word template to produce a Word document. A Special - Web Page View custom field combines an HTML template with system variables to produce a document that can be printed, exported, saved, or converted to PDF.
Special - Browser Script
The Special - Browser Script custom field adds a JavaScript to the page on which it is located, and the script executes according to its Trigger Type. Programmers use this control type to create enhanced functionality. In general, browser scripts must be at the end of the page, so they should be placed sequentially at the end of the list of custom fields.
Special - Button
The Special - Button custom field adds a configurable button that, when activated, can open pages within the same window, in a new tab, or within a modal window. For example, a button on a Level 1 record such as a grant can open the assignment grid, edit a user's organization profile, or create a new Level 2 record. A custom confirmation message can be shown before the target opens.
Special - MSWord Merge
The Special - MSWord Merge custom field dynamically creates a Word document from SmartSimple data. The Word template contains merge fields, and the custom field maps SmartSimple fields to those merge fields. When a user clicks the field's button on a record, SmartSimple dynamically creates the document and adds the SmartSimple data.
Setup involves three parts: the Word template, the template stored in a SmartFolder, and the custom field. The custom field points to either a SmartFolder or a specific file.
A Special - MSWord Merge custom field includes an editing option for one-time formatting corrections before the document is generated. Edits made with this option are not saved and do not update the underlying record; data corrections still need to be made at the field level.
Limitations
Only text fields can be merged. Image fields and file fields cannot be merged, and Rich Text fields are not suitable because of the extra encoding that supports formatting. HTML code in merge values works only when merging a single record, not in batch mode. It is recommended to check the file size, because pictures in the header or footer may interrupt the merge.
To keep or edit a generated document, the user may need to use the Word Save As feature, because some browsers open the document as read-only initially.
Special - Web Page View
The Special - Web Page View custom field creates a document-like view built from underlying entity data. It combines HTML with system variables and supports printing, exporting, saving, and converting to PDF. The HTML template is the body of the document and typically mixes HTML tags for layout, static text, and variables that are replaced with live values when the document is generated.
The field can require a signature before finalizing the document, lock it with a password before saving or emailing, or email it directly as a PDF or HTML attachment. It can also save the document automatically to a Multiple Files custom field on the record, export it as a Word document, or display it in more than one language based on the reader's selection.
A Special - Web Page View custom field includes an editing option for one-time formatting corrections before the document is generated. Edits made with this option are not saved and do not update the underlying record; data corrections still need to be made at the field level.
Resources
For more information about Special Control Types Custom Fields, see: