Widget Type:
Form Widgets
TPC Version:
  • 4.0
staticvaluelogo
The Static Value widget is used for inserting a static value into a widget. 

In other words, a user can select an attribute, and pre-set a value in the designer that will be inserted into this attribute. When user fills out a form that pre-set value would be set in CRM upon successful form submission. This widget uses a hidden input. 

For example, if a certain product is only allowed to be ordered as a single unit, the CRM Static Value widget could be used to automatically fill the quantity field to one.

Configuration

Basic

From the Portal Connector widget list, click and drag the Static Value widget into the body of your form. Click on the edit button to display the properties prompt.

The Static Value Field will fetch all of the attributes of the entity configured for the form. Selecting any of these attributes will provide you with the appropriate field(s) to set the value of the chosen attribute. 

Examples

Choosing an option-set field will provide you with a dropdown list containing the values for that attribute. 

Selecting a lookup field will provide you with a number of checkboxes, allowing you to specify if the widget should use the current logged-in users' contact id or parent-customer id.

Selecting a DateTime field will provide you with a DateTime picker.

dat-time-instructions-1

Widget Properties

Basic Properties

Attribute

The Attribute drop down list will allow you to change the data field that this widget will save the user’s input to (For example, a CRM Text Field with an Attribute of Account Name will save its input to the Account Name data field).

AlwaysSubmit

By default this widget will not submit unless there are other dirty fields submitting on the form. This property ensures the widget always submits it's data to Dynamics CRM

LoadValueFromSession

when this property is enable the static value will be loaded from the session variable set by the designer. 

SessionVariable

Session variable name.

Use Logged in User Parent Customer ID

The Use Logged in User Parent Customer ID check box will override any ID that is submitted through the form and will instead use the logged in user's Parent Customer ID to populate the form. If the user doesn't have an Account, the form will not load any records.

Use Logged in User Contact ID

The Use Logged in User Contact ID check box will override any ID that is submitted through the form and will instead use the logged in user's Contact ID to populate the form. If the user doesn't have a Contact ID, the form will not load any records.

Use Logged in Contact Id

This property will only appear when a lookup attribute is chosen for the Static Value Field.

Enabling this option will use the current logged in user's contact id on form submission.

Use Current Date and Time

This checkbox will appear when a DateTime attribute is chosen for the Static Value Field property.

Enabling this option will submit the current date and time into the chosen attribute.

ShowFrontEndView

The widget will display a front end view when this property set to true and when "Use Logged in User Parent Customer Id" or "Use Logged in User Contact Id" set to true.

Title

The Title text box will allow you to set the label of your widget. The title will usually appear above the associated widget.

ToolTipPosition

This property determines the position of the tool tip. By default this property is set to "Auto". You can change this to Left , Right , Top , Bottom. 

Tool Tip

The Tool Tip allows you to add a description or Hint to your widget.

EncryptGuids

The EncryptGuids advanced properties determines whether Guids should be encrypted or not. By default this is set to true.

LabelPosition

The LabelPosition advanced property specifies where the label of a widget will appear. By default, the label will appear on top of the widget. Applicable options include: Top and left. The content of the label is controlled by the Title property. The default value for this is 'Top'.

Advanced Properties

Advanced properties provide additional functionality. They can be accessed by clicking on the "Advanced" Button in the bottom right corner of the widget designer.

Attribute

The Attribute drop down list will allow you to change the data field that this widget will save the user’s input to (For example, a CRM Text Field with an Attribute of Account Name will save its input to the Account Name data field).

AlwaysSubmit

By default this widget will not submit unless there are other dirty fields submitting on the form. This property ensures the widget always submits it's data to Dynamics CRM

LoadValueFromSession

when this property is enable the static value will be loaded from the session variable set by the designer. 

SessionVariable

Session variable name.

Use Logged in User Parent Customer ID

The Use Logged in User Parent Customer ID check box will override any ID that is submitted through the form and will instead use the logged in user's Parent Customer ID to populate the form. If the user doesn't have an Account, the form will not load any records.

Use Logged in User Contact ID

The Use Logged in User Contact ID check box will override any ID that is submitted through the form and will instead use the logged in user's Contact ID to populate the form. If the user doesn't have a Contact ID, the form will not load any records.

Use Logged in Contact Id

This property will only appear when a lookup attribute is chosen for the Static Value Field.

Enabling this option will use the current logged in user's contact id on form submission.

Use Current Date and Time

This checkbox will appear when a DateTime attribute is chosen for the Static Value Field property.

Enabling this option will submit the current date and time into the chosen attribute.

ShowFrontEndView

The widget will display a front end view when this property set to true and when "Use Logged in User Parent Customer Id" or "Use Logged in User Contact Id" set to true.

Title

The Title text box will allow you to set the label of your widget. The title will usually appear above the associated widget.

ToolTipPosition

This property determines the position of the tool tip. By default this property is set to "Auto". You can change this to Left , Right , Top , Bottom. 

Tool Tip

The Tool Tip allows you to add a description or Hint to your widget.

EncryptGuids

The EncryptGuids advanced properties determines whether Guids should be encrypted or not. By default this is set to true.

LabelPosition

The LabelPosition advanced property specifies where the label of a widget will appear. By default, the label will appear on top of the widget. Applicable options include: Top and left. The content of the label is controlled by the Title property. The default value for this is 'Top'.

API

enable()

Enables the widget on the page.

Returns

None

set_value()

Sets the value of the widget.

Returns

String     

get_model()

Returns the model object of the widget, which contains a number of useful properties related to the widget.

Returns

Object

get_element()

Returns the element associated with the widget.

Returns

jQuery Object

get_container()

Returns the container element of the widget.

Returns

jQuery Object

get_input()

Returns the input element of the widget.

Returns

JQuery Object

get_type()

Returns the widget type.

Returns

String

get_value()

Returns the value of the widget.

Returns

String

disable()

Disables the widget on the page.

Returns

None