Home > Contents > Index >
AssetMaker   |    Cart Tags   |    Errors   |    Miscellany   |    Index

 

INPUTFORM

Specifies how data is placed in the edit and inspect forms for the property. An INPUTFORM statement is nested within a pair of PROPERTY tags and typically follows the STORAGE statement for the property. The input type for the field must be compatible with the data type of the database column, as specified by the STORAGE statement.

AssetMaker uses the INPUTFORM statements in the asset descriptor file when creating the following elements for the asset type:

For more information about these elements, see the AssetMaker section in the CSEE Developer's Guide.

Syntax

The syntax for this tag varies based on the setting for TYPE.

The following must be specified for source type STRING:

The following must be specified for source type TABLE:

The following must be specified for source type STRING:

The following must be specified for source type TABLE:

The following must be specified for source type STRING:

The following must be specified for source type TABLE:

Parameters

TYPE (required)
The input type of the field.

It must be set to one of the following values:

Input TYPE
Description
    TEXT
    
A single line of text. Corresponds to the HTML input type named TEXT.
    TEXTAREA
    
A text box, with scroll bars, that accepts multiple lines of text. Corresponds to the HTML input type named TEXTAREA.
When you create a text box that displays the contents of a URL column (rather than using an upload field that displays the URL of a file), you must set specify a string for PROPERTY NAME that begins with the letters "url" and set the STORAGE TYPE to VARCHAR.
    UPLOAD
    
A field that takes a file name and presents a Browse button so that you can either enter the name of a file or browse to it and select it.
The content of an upload field is the URL of a file. The URL appears in the asset forms.When the user clicks Save, Content Server uploads the selected file and stores it in the file directory specified by the DEFDIR parameter in the ASSET tag. (See ASSET.)
When you specify that a field is an upload field, set a string for PROPERTY NAME that begins with the letters "url" and set STORAGE TYPE (the property's data type) to VARCHAR.
    SELECT
    
A field that presents a drop-down list of options that can be selected.
You can either specify the options that are presented in the list or you can specify a query so that the options are selected from the database and presented dynamically.
Corresponds to the HTML input type SELECT.
    CHECKBOX
    
A check box field.
You can specify the names of the check box options or you can specify a query so that the names are selected from the database and presented dynamically.
Corresponds to the HTML input type CHECKBOX.
    RADIO
    
A radio button control.
You can either specify the names of the radio options or you can specify a query so that the names are selected from the database and presented dynamically.
Corresponds to the HTML input type RADIO.
    EWEBEDITPRO
    
A field whose contents you edit by using the eWebEditPro HTML editor, a third-party tool from Ektron, Inc.
When you specify that a field is an eWebEditPro field field, you must also set a string for PROPERTY NAME that begins with the letters "url" and set STORAGE TYPE (the property's data type) to VARCHAR.
    ELEMENT
    
A field to call a custom element during the display of the form. For ContentForm, the element is called from:
    OpenMarket/Xcelerate/AssetType/assettype/ContentForm/fieldname
    
For ContentDetails, the element is called from
    OpenMarket/Xcelerate/AssetType/assettype/ContentDetails/fieldname/
    

 

The value you set for INPUTFORM TYPE must be compatible with the STORAGE TYPE for this property. For more information, see Restrictions and Dependencies with TYPE.

REQUIRED (optional)
Whether the field is a required field. To specify that the field is required, set REQUIRED to YES. When REQUIRED="YES", the field is marked in the CS-Direct forms by the value of either MARKERTEXT or MARKERIMAGE (see ASSET) and CS-Direct does not allow an asset of this type to be saved unless there is a legal value in this field.

If you do not provide a value for the REQUIRED parameter, the field is not required.

DEFAULT (optional)
The default value that appears in the field before a value has been entered or selected.

MAXLENGTH (optional)
This parameter is used only by TEXT,TEXTAREA, UPLOAD, and EWEBEDITPRO input types.The maximum number of characters that can be entered in this field. For upload or URL fields the value is the length of the file name. For TEXTAREA, Javascript is added to the form to ensure that the test entered does not exceed the designated MAXLENGTH. If this parameter is not specified, AssetMaker uses the LENGTH value that you specified with the STORAGE tag to determine how many values can be entered in the field.

Use this parameter when you want to limit users to entering fewer characters in the field than the column can actually hold. Not that you cannot set this value to be greater than the LENGTH specified by the STORAGE tag.

INSTRUCTION (optional)
A short help message of up to 80 alphanumeric characters that appears near the field in the CS-Direct New or Edit forms.

HIDDEN (optional)
Whether or not the field is to be kept hidden from the CS-Direct users. Set HIDDEN="YES" to specify that this field is a hidden field. Note that while a hidden field is not displayed on an New or Edit form, the value for it is displayed in the Inspect form.

WIDTH (required)
The width of the field in characters when it is displayed in the form. Corresponds to the HTML attribute SIZE.

COLS (required)
The width of the text box in characters. For example, COLS="48". Corresponds to the HTML attribute COLS.

ROWS (required)
The height of the text box in lines. For example, ROWS="4".

Corresponds to the HTML attribute ROWS.

WIDTH (required)
The width of the field in characters.

Corresponds to the HTML attribute SIZE.

MIMETYPE (optional)
The mimetype of the file when the field can hold files of one type only. For example, if the field holds PDF files only, set MIMETYPE="PDF".

If you do not specify the MIMETYPE for a field with an input type of UPLOAD, AssetMaker expects to find a separate mimetype field. You create a separate mimetype field when your UPLOAD field can hold files of more than one type.

For example, if the asset type is for image files and the UPLOAD field can hold either .jpg files or .gif files, code a separate PROPERTY statement in the asset descriptor file for a mimetype field that presents a drop-down list of file type options.

LINKTEXT (required)
A text string that AssetMaker uses to format the link to the file identified by this field on the Inspect form for the asset. For example, if you set LINKTEXT="Image", then, on the Inspect form for assets of this type, the link to file is named "Image."

MULTIPLE (optional)
Whether or not the field accepts multiple values. When this parameter is not set, the field accepts one value only. If you set MULTIPLE="YES", the field can hold more than one value.

Note

When setting multiple YES values make sure that the storage field is long enough to handle all the possible selections.

SOURCETYPE (required)
The source of the options available in the drop-down list for this field.

OPTIONDESCRIPTIONS (required when SOURCETYPE="STRING")
A list of the options that appear in the drop-down list in the form, separated by commas. For example, OPTIONDESCRIPTIONS="red,yellow,blue,green".

OPTIONVALUES (required when SOURCETYPE="STRING")
A list of the values that map to the options specified by the OPTIONDESCRIPTIONS parameter. In other words, you can specify that the options that appear in the drop-down list are "red,yellow,blue,green" but that the values that are written to the database are "r,y,b,g".

Note

If the data type of this field is numeric and you use the OPTIONVALUES parameter to create a string list for CS-Direct to use when populating the field, your list of values must be compatible with the way numeric values are stored in your DBMS.

For example, say that STORAGE TYPE="DOUBLE", INPUTFORM TYPE="SELECT", and SOURCE="STRING". To specify that one of the values that can be entered in this field is 100,000, you specify "100000" as one of the OPTIONVALUES if your DBMS is SQLServer but you specify "100000.0000000000" if your DBMS is Oracle.

In other words, the format of the values in such a string list must match that of your DBMS. Generally speaking, using a static list of string values is not a good choice for numeric data types.

TABLENAME (required when SOURCETYPE="TABLE")
The name of the Content Server table that the options and their corresponding values are to be found in. AssetMaker creates a SQL query for this field based on the values you set for TABLENAME, OPTIONDESCKEY, and OPTIONVALUEKEY.

OPTIONDESCKEY (required when SOURCETYPE="TABLE")
The name of the column in the table identified by TABLENAME that contains the options that appear in the drop-down list in the form.

OPTIONVALUEKEY (required when SOURCETYPE="TABLE")
The name of the column in the table identified by TABLENAME that holds the values that are written to the database when the user selects an option from the drop-down list.

SQL (optional when SOURCETYPE="TABLE")
A SQL statement that overrides the SQL query that AssetMaker creates based on the values provided with the previous three parameters. Use the SQL parameter when you want to include additional clauses in the query.

The query is still based on the values provided for the previous three parameters which means that in addition to the additional clauses you include, the statement must specify the table specified by TABLENAME as the source and it must select data from the two columns identified by OPTIONDESCKEY and OPTIONVALUEKEY.

SOURCETYPE (required)
The source of the names listed next to the check boxes.

CBDESCRIPTIONS (required when SOURCETYPE="STRING")
A list of the names that appear next to the check boxes, in the order that you want them to appear, separated by commas. For example, CBDESCRIPTIONS="red,yellow,blue,green".

CBVALUES (required when SOURCETYPE="STRING")
A list of the values that map to the check box names specified by the CBDESCRIPTIONS parameter. In other words, you can specify that the names that appear next to the check boxes are "red,yellow,blue,green" but that the values that are written to the database are "r,y,b,g".

Note

If the data type of this field is numeric and you use the CBVALUES parameter to create a string list for CS-Direct to use as the check box names, your list of values must be compatible with the way numeric values are stored in your DBMS.

For example, say that STORAGE TYPE="DOUBLE", INPUTFORM TYPE="CHECKBOX", and SOURCE="STRING". To specify the value that can be entered in this field is 100,000, you specify "100000" as the value for OPTIONVALUES if your DBMS is SQLServer but you specify "100000.0000000000" if your DBMS is Oracle.

In other words, the format of the values in such a string list must match that of your DBMS. Generally speaking, using a static list of string values is not a good choice for numeric data types.

TABLENAME (required when SOURCETYPE="TABLE")
The name of the Content Server table that the check box names and their corresponding values are to be found in. AssetMaker creates a SQL query for this field based on the values you set for TABLENAME, CBDESCKEY, and CBVALUEKEY.

CBDESCKEY (required when SOURCETYPE="TABLE")
The name of the column in the table identified by TABLENAME that contains the names that appear next to the check boxes on the form.

CBVALUEKEY (required when SOURCETYPE="TABLE")
The name of the column in the table identified by TABLENAME that holds the values that are written to the database when the user selects the check box.

SQL (optional when SOURCETYPE="TABLE")
A SQL statement that overrides the SQL query that AssetMaker creates based on the values provided with the previous three parameters. Use the SQL parameter when you want to include additional clauses in the query.

The query is still based on the values provided for the previous three parameters which means that in addition to the additional clauses you include, the statement must specify the table specified by TABLENAME as the source and it must select data from the two columns identified by CBDESCKEY and CBVALUEKEY.

SOURCETYPE (required)
The source of the names listed next to the radio buttons.

RBDESCRIPTIONS (required when SOURCETYPE="STRING")
A list of the names that appear next to the radio options, in the order that you want them to appear, separated by commas. For example, RBDESCRIPTIONS="red,yellow,blue,green".

RBVALUES (required when SOURCETYPE="STRING")
A list of the values that map to the radio options specified by the RBDESCRIPTIONS parameter. In other words, you can specify that the options that appear next to the check boxes are "red,yellow,blue,green" but that the values that are written to the database are "r,y,b,g".

Note

If the data type of this field is numeric and you use the CBVALUES parameter to create a string list for CS-Direct to use as the check box names, your list of values must be compatible with the way numeric values are stored in your DBMS.

For example, say that STORAGE TYPE="DOUBLE", INPUTFORM TYPE="RADIO", and SOURCE="STRING". To specify the value that can be entered in this field is 100,000, you specify "100000" as the value for OPTIONVALUES if your DBMS is SQLServer but you specify "100000.0000000000" if your DBMS is Oracle.

In other words, the format of the values in such a string list must match that of your DBMS. Generally speaking, using a static list of string values is not a good choice for numeric data types.

TABLENAME (required when SOURCETYPE="TABLE")
The name of the Content Server table that the check box options and their corresponding values are to be found in. AssetMaker creates a SQL query for this field based on the values you set for TABLENAME, RBDESCKEY, and RBVALUEKEY.

RBDESCKEY (required when SOURCETYPE="TABLE")
The name of the column in the table identified by TABLENAME that contains the options that appear next to the radio buttons on the form.

RBVALUE (required when SOURCETYPE="TABLE")
The name of the column in the table identified by TABLENAME that holds the values that are written to the database when the user selects the radio button.

SQL (optional when SOURCETYPE="TABLE")
A SQL statement that overrides the SQL query that AssetMaker creates based on the values provided with the previous three parameters. Use the SQL parameter when you want to include additional clauses in the query.

The query is still based on the values provided for the previous three parameters which means that in addition to the additional clauses you include, the statement must specify the table specified by TABLENAME as the source and it must select data from the two columns identified by RBDESCKEY and RBVALUEKEY.

WIDTH (required)
The width of the eWebEditPro field in characters. For example, WIDTH="300".

HEIGHT (required)
The height of the eWebEditPro field in lines. For example, HEIGHT="300".

Examples

This code fragment creates a text field named "Title":

This code fragment creates a text box field named "Author's Note":

This code fragment creates an upload field named "Thumbnail File":

This code fragment creates a select field named "Mimetype" with a drop-down list that uses a SQL query to obtain the values for the list:

This code fragment creates a select field that accepts multiple values from a drop-down field named "Credit Card Type":

This code fragment creates a set of check boxes named "Ground," "2nd Day," and "Next Day":

This code fragment creates a set of a radio options "Ground," "2nd Day," and "Next Day":

This code fragment creates an eWebEditPro field named "urlbody":

  Home > Contents > Index >

FatWire Miscellaneous Reference
Copyright 2005 by FatWire Software
All rights reserved.