Salesforce

Content Fields

« Go Back
Information
Content Fields
content-fields
Article Details

Introduction

Content fields can be used to create content; either static text or HTML, which can in turn utlilize content from other tokens.

Useful when creating customized output for emails and/or printables as well as imparting details to a form itself to be visible to the form filler

To add a content field use the content icon on the form designer screen.

Content Field Types

Static Text 

Static text fields allow for display text on a form, for example to add a heading or some explanatory text headings. 

  • Static text fields cannot be used as a token.
  • If you have already entered a token within a static text box and it is not working, delete the token and re-enter this again. You will know it is working as the token will not show in the form.

Within the static text editor you have a number of formats and tools available to create text in a range of display outputs

static text editor

When there is a hyperlink added to a static text field that does not open in a new windo - it can cause the form to open itself within self - so the self menu appears twice - we would recomend using HTML fields to insert these hyperlinks and set the target at top eg <a href="https://www.w3schools.com/html/" target="_top">Visit our HTML tutorial!</a>  see https://html.com/attributes/a-target/


HTML

HTML fields allow a form designer to implement their own customer HTML. This is an advanced function that only designers who have a working knowledge of HTML will use. This also supports the embedding of other custom code such as Javascript. (NB: if JavaScript includes { this will be interpreted as a token by Forms, therefore use {{} and this will stop the system trying to use the code as a token. )

  • HTML fields cannot be used as a token
  • Granicus does not provide support for custom code eg Javascript

Note: The tokens {visiblesummary}, {hiddensummary}, {unhiddensummary}, {alltokens}, {allfields}, {allsummary} and any token that is started with a hash will render as html within an html field. Ie.  this means that the tokens used within html fields will need to be changed from {envTokenWithinHtml} to {#envTokenWithinHtml}. For {visiblesummary}, {hiddensummary}, {unhiddensummary}, {alltokens}, {allfields}, and {allsummary}, we will still escape the user entered values but the rest of the styling html will render as before.

For security reasons, certain functions will be stripped from token values . The target=_blank function is one of these - this function is inherently insecure so we do not support its use in forms. Script embedded in the form design (rather than coming from tokens) is not affected so there are a number of workarounds that you can use instead. 


Line 

Line will place a line across the form for display and separation purposes.


Spacer 

Spacer will place a gap between fields for display and separation purposes.  

adding content

Specific Field Properties

Content fields are generally quite different from the other field types in forms, and have different settings dependent on the field type. All of the fields have Outer Class and Width in (EMs). See the basic field properties for more on these. Otherwise there are some specific field properties listed below:

Static Text Fields

Content is where the you put the information that is to be displayed.  Content is powered by a powerful rich text editor (http://www.tinymce.com/), allowing the form designer to input a large range of static content including rich text, images, videos and files. 

Please note, to add line breaks to static text fields that render on fill in, you will need to press Shift and Enter. Enter will move to the next row but this spacing will not render during fill in.

HTML Field Settings 

HTML Content this is where you place your HTML. The editor has been designed to assist with editing HTML and as such will help with auto complete functions. (Note: it is advisable to check html for code errors and accessibility)

Note: When you use a link within a form to a separate form or webpage, this link will either open in a new window, or in the same page. However, due to the iframes used in Self to display the form, sometimes this link may open within the iframe, leading to a form-within-a-form. To avoid this use the attribute target="_top" in your link HTML.

Example:

<a href="https://support01-forms.achieveservice.com" target="_top">

Display Condition

Field display conditions allow fields to be displayed only if certain criteria have been met on a previous section. The field in question will only be displayed if the condition is met.

Passing Formatted Text from a Text Area Field into a Static Text Field

It is possible to pull through text, which is formatted using HTML, from a text area field into a static text field. The HTML, however, has to be included in the text area field. In order for the token in the static text field to recognise the HTML entered into the text area field, you have to add a # symbol to the beginning of the token.

html

 



     

    Powered by