Table of Contents

Class CustomFormField

Namespace
CustomFormProcessor
Assembly
PolarStudio.dll

This class contains one field as is created within a custom form.

public class CustomFormField : XMLobject<CustomForm>
Inheritance
CustomFormField
Inherited Members
Extension Methods

Fields

FieldValueError

Gets/sets a boolean indicating the value of this field has an error, used to display the field in a different color.

public bool FieldValueError

Field Value

bool

Rendered

Gets/sets if the field is rendered (and must be updated).

public bool Rendered

Field Value

bool

Properties

Alignment

Gets/sets the alignment of the control. Use -1 for left, 0 for centered and 1 for right.

public int Alignment { get; set; }

Property Value

int

CalculatedField

Gets/sets if this field is a calculated field.

public bool CalculatedField { get; set; }

Property Value

bool

CalculationStorageField

Gets/sets the field name used for the field in which the calculation result is stored.

public string CalculationStorageField { get; set; }

Property Value

string

Caption

Gets/sets the caption for this field.

public string Caption { get; set; }

Property Value

string

CaptionWidth

Gets/sets the width of the caption for this field.

public int CaptionWidth { get; set; }

Property Value

int

ClassName

Gets/sets the css class for this control.

public string ClassName { get; set; }

Property Value

string

CustomForm

Gets the containg custom form.

public CustomForm CustomForm { get; }

Property Value

CustomForm

Decimals

Gets/sets the number of decimals to format a numeric value.

public int Decimals { get; set; }

Property Value

int

DefaultValue

Gets/sets the default value as script-expression.

public string DefaultValue { get; set; }

Property Value

string

EditAllowed

Gets/sets a boolean indicating this field is edit allowed.

public bool EditAllowed { get; set; }

Property Value

bool

EditAllowedScript

Gets/sets a script-expression that must return a boolean indicating if the field is editable.

public string EditAllowedScript { get; set; }

Property Value

string

EditAllowedStates

Gets/sets a states expression indicating for which states this field is (not) editable.

public string EditAllowedStates { get; set; }

Property Value

string

ErrorMessage

Gets the error message when the field was update.

public string ErrorMessage { get; }

Property Value

string

FieldSubType

Gets/sets the field sub type for this field.

public string FieldSubType { get; set; }

Property Value

string

FieldType

Gets/sets the fieldtype for this field.

public string FieldType { get; set; }

Property Value

string

HTMLfieldName

Gets the name to use for the html control.

public string HTMLfieldName { get; set; }

Property Value

string

Height

Gets/sets the height for this field.

public int Height { get; set; }

Property Value

int

IncludeInFullTextSearch

Gets/sets a boolean indicating this field is to be included in the full text search. Is not used formally.

public bool IncludeInFullTextSearch { get; set; }

Property Value

bool

KeepWithPrevious

Gets/sets a boolean indicating this field must be rendered directly after the previous field.

public bool KeepWithPrevious { get; set; }

Property Value

bool

LookupAdditionalWhere

Gets/sets the additional where clause used for a lookup.

public string LookupAdditionalWhere { get; set; }

Property Value

string

LookupAutoSelect

Gets/sets a boolean to auto-select the value for this field if only one option is available.

public bool LookupAutoSelect { get; set; }

Property Value

bool

Gets/sets a boolean indicating a lookup also creates a link to show the details of the chosen value.

public bool LookupShowDetailsLink { get; set; }

Property Value

bool

LookupTableName

Gets/sets the name of the table used for a lookup.

public string LookupTableName { get; set; }

Property Value

string

MaxValue

Gets/sets the maximum value for numeric fields. For text fields, this is used as the maximum lenght.

public object MaxValue { get; set; }

Property Value

object

MinValue

Gets/sets the minimum value for numeric fields. For text fields, this is used as the minimum length.

public object MinValue { get; set; }

Property Value

object

Placeholder

Gets/sets the placeholder for this field.

public string Placeholder { get; set; }

Property Value

string

RepostForm

Gets/sets a boolean indicating a change in this field must repost the form.

public bool RepostForm { get; set; }

Property Value

bool

Required

Gets/sets if this field is required.

public bool Required { get; set; }

Property Value

bool

SentToBrowser

Gets/sets a boolean indicating this field is send to the browser.

public bool SentToBrowser { get; set; }

Property Value

bool

ShowFormControl

Gets/sets a boolean indicating a control must be shown for this field.

public bool ShowFormControl { get; set; }

Property Value

bool

Style

Gets the Style-object representing the style of this control.

public Style Style { get; }

Property Value

Style

StyleSettings

Gets/sets the css style settings for this control.

public string StyleSettings { get; set; }

Property Value

string

Tag

Gets/sets the tag of this field.

public string Tag { get; set; }

Property Value

string

ThousandSeparator

Gets/sets if numbers must visually separate the thousands, like: 1.048.576

public bool ThousandSeparator { get; set; }

Property Value

bool

Value

Gets/sets the value of this field.

public object Value { get; set; }

Property Value

object

ViewAllowedScript

Gets/sets a script-expression that must return a boolean indicating if the field is visible.

public string ViewAllowedScript { get; set; }

Property Value

string

ViewAllowedStates

Gets/sets a states expression indicating for which states this field is (not) visible.

public string ViewAllowedStates { get; set; }

Property Value

string

ViewOnceStarted

Gets/sets if this field is only visible once the record is 'started'.

public bool ViewOnceStarted { get; set; }

Property Value

bool

Visible

Gets/sets if the field is visible.

public bool Visible { get; set; }

Property Value

bool

Width

Gets/sets the width for this field.

public int Width { get; set; }

Property Value

int

XML

Gets the xml for this field.

public XmlNode XML { get; }

Property Value

XmlNode

Methods

CalculatedValue(Context)

Gets the calculated value for calculated fields. For other fields simply gets the value.

public object CalculatedValue(Context pContext)

Parameters

pContext Context

The context.

Returns

object

The calulated value or value of this field.

CreateHTML(Context, CustomForm, bool)

This method creates the html for the control for this custom field.

public string CreateHTML(Context pContext, CustomForm pCustomForm, bool pReadOnly = false)

Parameters

pContext Context

The context.

pCustomForm CustomForm

The containing custom form.

pReadOnly bool

Pass True to make the field not-editable.

Returns

string

The html for this control.

DisplayValue(Context, bool, bool)

Returns the DisplayValue for this field.

public string DisplayValue(Context pContext, bool pReturnPlainText = false, bool pOnlyCheckedItems = false)

Parameters

pContext Context

The context.

pReturnPlainText bool

A boolean to return the display value as plain text instead of html.

pOnlyCheckedItems bool

A boolean indicating only checked items are to be returned for multiple selects.

Returns

string

The html or text for the display value.

GetLookupData(Context, bool, int, string)

Returns an array of objects with dimensions [2, RowCount], just like the RecordSet.GetRows() does

public object[,] GetLookupData(Context pContext, bool pReturnSelectedValuesOnly, int pMaxRecordCount = 0, string pFilter = "")

Parameters

pContext Context
pReturnSelectedValuesOnly bool
pMaxRecordCount int
pFilter string

Returns

object[,]

IsEditAllowed(Context, CustomForm)

Gets if this field is editable.

public bool IsEditAllowed(Context pContext, CustomForm pCustomForm)

Parameters

pContext Context

The context.

pCustomForm CustomForm

The containing custom form.

Returns

bool

True if edit is allowed.

IsNotNull()

Returns True if this field has a value.

public bool IsNotNull()

Returns

bool

IsNull()

Returns True if this field has no value.

public bool IsNull()

Returns

bool

IsVisible(Context, CustomForm)

Gets if this field is visible

public bool IsVisible(Context pContext, CustomForm pCustomForm)

Parameters

pContext Context

The context.

pCustomForm CustomForm

The containing custom form

Returns

bool

True if visible.

PlaceholderExpression(Context)

This method returns the html to add to a control for the placeholder.

public string PlaceholderExpression(Context pContext)

Parameters

pContext Context

The context.

Returns

string

A html expression for the placeholder for this html control.

RepostFormHTML()

Returns the HTML to repost the form (only if needed).

public string RepostFormHTML()

Returns

string