Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Add a Field to Your Form

...

There is no need to specify the formID in which the field is going to be pre-filled in AddFieldToForm method. All fields set here will be added in the form package you are generating, that you define in the AddFormID method or QuikFormID property.

Important: When prefilling checkboxes with data, it is imperative that customers remove the "QuikRadio<Form ID #>" prefix from the FieldName value. For example, when attempting to prefill the “QuikRadio38002.1acc.RegType" field, the FieldName value supplied to the form should be “1acc.RegType".

Some examples are described below. 

Basic Usage

Parameters

Parameter

Description

FieldName

Gets or sets the name of the field

FieldValue

Gets or sets the value of the field

FieldReadOnly

Determines if a field is read-only

FieldVisibility

Determines if field is visible or hidden

FieldRequired

Determines if field is required

FieldFormat

Overrides the default field format (if any) for the field. Format is specified as numeric or alphanumeric (# = number, a = alpha, any other character is a literal value (e.g. "(###) ###-####" will create "(310) 555-1222" for the value "3105551222").

FieldMaskFlag

If TRUE, field values are displayed masked (e.g. *********) instead of in clear text.

FieldCalcOverride

Gets or sets whether a field is calculated or not.

HiddenField

If TRUE, the field should be added to the form as an input field with type = hidden.


Using AddFieldToForm in Web Services

REST

In the Quik! Forms Engine REST service, field data and attributes are added to forms via the FormFields object in the /execute/html endpoint.

Code Block
languagejs
titleCode Snippet
"FormFields": [
    {
      "FieldName": "string",
      "FieldValue": "string",
      "FieldBackgroundColor": "string",
      "SemiRequired": true,
      "AttachFile": true,
      "AttachTitle": "string",
      "RequiredByField": "string",
      "RequiredByFieldValues": "string",
      "FieldReadOnly": 0,
      "FieldVisibility": 0,
      "FieldRequired": 0,
      "FieldFormat": "string",
      "FieldMaskFlag": true,
      "FieldCalcOverride": true,
      "HiddenField": true,
      "MaxCharLength": 0
    }
  ],

Legacy Methods - Deprecated and No Longer In Use

SOAP

In the Quik! Forms Engine SOAP service, field data and attributes are added to forms via the FormFields object, which is part of the QFESettings parameter in the Execute endpoint.

Code Block
languagexml
titleCode Snippet
<soap:Header>
   <AuthenticationHeader xmlns="https://websvcs.quikforms.com/quikformsenginews/">
     <CustomerID></CustomerID>
     <UserName></UserName>
     <Password></Password>
   </AuthenticationHeader>
 </soap:Header>
 <soap:Body>
   <Execute xmlns="https://websvcs.quikforms.com/quikformsenginews/">
     <QFESettings>
       <FormIDs></FormIDs>
        <FormFields>
         ...
       </FormFields>
	<QFESettings>


VB.NET

Code Block
languagevb
themeConfluence
titleSample Code
objQFE.AddFieldToForm("1own.FullName", "John Smith")

...

Code Block
languagevb
titleSample Code
'Add hidden field 
objQFE.AddFieldToForm( _
FieldName:="TransactionID", _
FieldValue:="123456789", _
FieldReadOnly:=QuikFormsEngine.QFD.FieldReadOnly.NoRestrictions, _
FieldVisibility:=QuikFormsEngine.QFD.FieldVisibility.None, _
FieldRequired:=QuikFormsEngine.QFD.FieldRequired.NotRequired, _
FieldFormat:="", _
FieldMaskFlag:=False, _
FieldCalcOverride:=False, _
HiddenField:=True)

...

Parameter

...

Description

...

FieldName

...

Gets or sets the name of the field

...

FieldValue

...

Gets or sets the value of the field

...

FieldReadOnly

...

Determines if a field is read-only

...

...

Determines if field is visible or hidden

...

FieldRequired

...

Determines if field is required

...

FieldFormat

...

Overrides the default field format (if any) for the field. Format is specified as numeric or alphanumeric (# = number, a = alpha, any other character is a literal value (e.g. "(###) ###-####" will create "(310) 555-1222" for the value "3105551222").

...

FieldMaskFlag

...

If TRUE, field values are displayed masked (e.g. *********) instead of in clear text.

...

FieldCalcOverride

...

Gets or sets whether a field is calculated or not.

...

HiddenField

...

If TRUE, the field should be added to the form as an input field with type = hidden.

AddFieldToForm(FormField As QuikFormsEngine.FormField)

...

In the example above, field 1ben.FName is pre-filled into the form package with a specific background color. We also made it required when 1ben.LName has some value, and it has an attachment icon next to it for adding attachments into the form package.

Using AddFieldToForm in Web Services

REST

In the Quik! Forms Engine REST service, field data and attributes are added to forms via the FormFields object in the /execute/html endpoint.

Code Block
languagejs
titleCode Snippet
"FormFields": [
    {
      "FieldName": "string",
      "FieldValue": "string",
      "FieldBackgroundColor": "string",
      "SemiRequired": true,
      "AttachFile": true,
      "AttachTitle": "string",
      "RequiredByField": "string",
      "RequiredByFieldValues": "string",
      "FieldReadOnly": 0,
      "FieldVisibility": 0,
      "FieldRequired": 0,
      "FieldFormat": "string",
      "FieldMaskFlag": true,
      "FieldCalcOverride": true,
      "HiddenField": true,
      "MaxCharLength": 0
    }
  ],

SOAP

In the Quik! Forms Engine SOAP service, field data and attributes are added to forms via the FormFields object, which is part of the QFESettings parameter in the Execute endpoint.

...

languagexml
titleCode Snippet

...