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
Rendered
Gets/sets if the field is rendered (and must be updated).
public bool Rendered
Field Value
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
CalculatedField
Gets/sets if this field is a calculated field.
public bool CalculatedField { get; set; }
Property Value
CalculationStorageField
Gets/sets the field name used for the field in which the calculation result is stored.
public string CalculationStorageField { get; set; }
Property Value
Caption
Gets/sets the caption for this field.
public string Caption { get; set; }
Property Value
CaptionWidth
Gets/sets the width of the caption for this field.
public int CaptionWidth { get; set; }
Property Value
ClassName
Gets/sets the css class for this control.
public string ClassName { get; set; }
Property Value
CustomForm
Gets the containg custom form.
public CustomForm CustomForm { get; }
Property Value
Decimals
Gets/sets the number of decimals to format a numeric value.
public int Decimals { get; set; }
Property Value
DefaultValue
Gets/sets the default value as script-expression.
public string DefaultValue { get; set; }
Property Value
EditAllowed
Gets/sets a boolean indicating this field is edit allowed.
public bool EditAllowed { get; set; }
Property Value
EditAllowedScript
Gets/sets a script-expression that must return a boolean indicating if the field is editable.
public string EditAllowedScript { get; set; }
Property Value
EditAllowedStates
Gets/sets a states expression indicating for which states this field is (not) editable.
public string EditAllowedStates { get; set; }
Property Value
ErrorMessage
Gets the error message when the field was update.
public string ErrorMessage { get; }
Property Value
FieldSubType
Gets/sets the field sub type for this field.
public string FieldSubType { get; set; }
Property Value
FieldType
Gets/sets the fieldtype for this field.
public string FieldType { get; set; }
Property Value
HTMLfieldName
Gets the name to use for the html control.
public string HTMLfieldName { get; set; }
Property Value
Height
Gets/sets the height for this field.
public int Height { get; set; }
Property Value
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
KeepWithPrevious
Gets/sets a boolean indicating this field must be rendered directly after the previous field.
public bool KeepWithPrevious { get; set; }
Property Value
LookupAdditionalWhere
Gets/sets the additional where clause used for a lookup.
public string LookupAdditionalWhere { get; set; }
Property Value
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
LookupShowDetailsLink
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
LookupTableName
Gets/sets the name of the table used for a lookup.
public string LookupTableName { get; set; }
Property Value
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
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
Placeholder
Gets/sets the placeholder for this field.
public string Placeholder { get; set; }
Property Value
RepostForm
Gets/sets a boolean indicating a change in this field must repost the form.
public bool RepostForm { get; set; }
Property Value
Required
Gets/sets if this field is required.
public bool Required { get; set; }
Property Value
SentToBrowser
Gets/sets a boolean indicating this field is send to the browser.
public bool SentToBrowser { get; set; }
Property Value
ShowFormControl
Gets/sets a boolean indicating a control must be shown for this field.
public bool ShowFormControl { get; set; }
Property Value
Style
Gets the Style-object representing the style of this control.
public Style Style { get; }
Property Value
StyleSettings
Gets/sets the css style settings for this control.
public string StyleSettings { get; set; }
Property Value
Tag
Gets/sets the tag of this field.
public string Tag { get; set; }
Property Value
ThousandSeparator
Gets/sets if numbers must visually separate the thousands, like: 1.048.576
public bool ThousandSeparator { get; set; }
Property Value
Value
Gets/sets the value of this field.
public object Value { get; set; }
Property Value
ViewAllowedScript
Gets/sets a script-expression that must return a boolean indicating if the field is visible.
public string ViewAllowedScript { get; set; }
Property Value
ViewAllowedStates
Gets/sets a states expression indicating for which states this field is (not) visible.
public string ViewAllowedStates { get; set; }
Property Value
ViewOnceStarted
Gets/sets if this field is only visible once the record is 'started'.
public bool ViewOnceStarted { get; set; }
Property Value
Visible
Gets/sets if the field is visible.
public bool Visible { get; set; }
Property Value
Width
Gets/sets the width for this field.
public int Width { get; set; }
Property Value
XML
Gets the xml for this field.
public XmlNode XML { get; }
Property Value
Methods
CalculatedValue(Context)
Gets the calculated value for calculated fields. For other fields simply gets the value.
public object CalculatedValue(Context pContext)
Parameters
pContext
ContextThe 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
ContextThe context.
pCustomForm
CustomFormThe containing custom form.
pReadOnly
boolPass 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
ContextThe context.
pReturnPlainText
boolA boolean to return the display value as plain text instead of html.
pOnlyCheckedItems
boolA 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
Returns
- object[,]
IsEditAllowed(Context, CustomForm)
Gets if this field is editable.
public bool IsEditAllowed(Context pContext, CustomForm pCustomForm)
Parameters
pContext
ContextThe context.
pCustomForm
CustomFormThe containing custom form.
Returns
- bool
True if edit is allowed.
IsNotNull()
Returns True if this field has a value.
public bool IsNotNull()
Returns
IsNull()
Returns True if this field has no value.
public bool IsNull()
Returns
IsVisible(Context, CustomForm)
Gets if this field is visible
public bool IsVisible(Context pContext, CustomForm pCustomForm)
Parameters
pContext
ContextThe context.
pCustomForm
CustomFormThe 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
ContextThe 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()