Define a Custom Control

Important: To customize styling and behavior of Latest Version interviews use interview extensions. Custom controls are only for use with August 2016 version interviews, and for labels in Latest Version interviews where interview extensions are not sufficient to achieve desired behavior.

Custom controls allow completely customized styling to be applied to controls on Intelligent Advisor interview screens. This is a flexible feature that enables many possibilities such as:

  • including static content that can be changed independently of the Intelligent Advisor interview
  • rich inline content that can be based on interview data, rule results and external data
  • controls with dynamic content
  • completely customized data entry

For example, where the rules have determined a set of benefit plans that are applicable to a customer, a custom control could be used to format that information in the preferred way.

Policy Modeling allows you to define a custom control on an interview screen for:

Programming expertise is needed to create a custom control handler that provides dynamic HTML content for a custom control. For more information, see Develop a Custom Control Handler.

Customizations are applied to individual controls on an interview screen. To specify a custom control for a text attribute input control or for a label:

  1. In Policy Modeling on the Interview tab, open the screen containing the control that you want to specify the custom control for.
  2. Select the control in the screen list view. Note that custom controls for text attribute input controls require that the text attribute has a name. For more information, see Choose an Attribute Name.
  3. Click the input type button and select the Custom option from the drop-down list.
  4. In the Custom Control Options dialog box, enter the URL that provides the HTML content that is to be displayed for the control.

    Policy Modeling Custom Control Options dialog box (accessible from the Interview tab) showing a URL in the URL field.
  5. Click OK.

Notes:

  • The HTML content returned by the provided URL will be incorporated into a larger HTML page, so is not a full HTML page in its own right.
  • The URL can refer to:
    • static HTML content. This is useful for content that needs to be changed independently of the Intelligent Advisor project release cycle, or
    • a location where the custom control content will be generated programmatically. PHP or any other programming technology can be used to implement the required custom control handler. This handler can generate content based on the value of attributes in the Intelligent Advisor interview, as well as render content using the result of external database queries, for example, a list of office locations.
  • URLs must either start with a protocol (for example, http://) or with a substitution (for example, %targetURL%).
  • Attribute text substitution enables you to use the value of a non-Boolean global attribute as part of the URL. For more information, see Show Attribute Values On Screens. Note that the attribute value being substituted cannot be collected on the same screen as the custom control.
  • A redirection containing a substitution will be URL encoded. Where a redirection starts with "%" it is presumed to already be encoded and is just output as is.
  • You should also set the value of any additional properties for the input control or label. For more information, see Define Custom Properties for Screens and Controls.

Tip: There is an alternate version of the Emergency Response example project using custom controls.