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 ofPROPERTY
tags and typically follows theSTORAGE
statement for the property. The input type for the field must be compatible with the data type of the database column, as specified by theSTORAGE
statement.AssetMaker uses the
INPUTFORM
statements in the asset descriptor file when creating the following elements for the asset type:
ContentForm.xml
, which formats the Sites New and Edit forms
ContentDetails.xml
, which formats the Sites Inspect formFor more information about these elements, see the AssetMaker section in the Sites Developer's Guide.
Syntax
The syntax for this tag varies based on the setting for
TYPE
.
TYPE="TEXT"
<INPUTFORM
TYPE="TEXT
" [REQUIRED="YES|NO
"] [DEFAULT="default value
"] [MAXLENGTH="length
"] [INSTRUCTION="help for using the field
"] [HIDDEN="YES|NO
"] WIDTH="width
"/>
TYPE="TEXTAREA"
<INPUTFORM
TYPE="TEXT
AREA" [REQUIRED="YES|NO
"] [DEFAULT="default value
"] [MAXLENGTH="length
"] [INSTRUCTION="help for using the field
"] [HIDDEN="YES|NO
"] [WIDTH="text box width
]" [HEIGHT="text box height
]" [EMBEDDEDLINKS="YES/NO"]/>
TYPE="UPLOAD"
<INPUTFORM
TYPE="UPLOAD
" [REQUIRED="YES|NO
"] [DEFAULT="default value
"] [MAXLENGTH="length
"] [INSTRUCTION="help for using the field
"] [HIDDEN="YES|NO
"] WIDTH="width
" LINKTEXT="text string
" [MIMETYPE="file type
"]/>
TYPE="SELECT"
<INPUTFORM
TYPE="SELECT
" [REQUIRED="YES|NO
"] [DEFAULT="default value
"] [INSTRUCTION="help for using the field
"] [HIDDEN="YES|NO
"] [MULTIPLE="YES|NO
"] SOURCETYPE="STRING|TABLE
"The following must be specified for source type
STRING
:
OPTIONDESCRIPTIONS="xxx,yyy,zzz
" OPTIONVALUES="x,y,z
"The following must be specified for source type
TABLE
:
TABLENAME="table name
" OPTIONDESCKEY="column name
" OPTIONVALUEKEY="column name
" [SQL="SQL statement
"]/>
TYPE="CHECKBOX"
<INPUTFORM
TYPE="CHECKBOX
" MULTIPLE="YES" [REQUIRED="YES|NO
"] [DEFAULT="default value
"] [INSTRUCTION="help for using the field
"] [HIDDEN="YES|NO
"] SOURCETYPE="STRING|TABLE
"The following must be specified for source type
STRING
:
CBDESCRIPTIONS="xxx,yyy,zzz
" CBVALUES="x,y,z
"The following must be specified for source type
TABLE
:
TABLENAME="table name
" CBDESCKEY="column name
" CBVALUEKEY="column name
" [SQL="SQL statement
"]/>
TYPE="RADIO"
<INPUTFORM
TYPE="RADIO
" [REQUIRED="YES|NO
"] [DEFAULT="default value
"] [INSTRUCTION="help for using the field
"] [HIDDEN="YES|NO
"] SOURCETYPE="STRING|TABLE
"The following must be specified for source type
STRING
:
RBDESCRIPTIONS="xxx,yyy,zzz
" RBVALUES="x,y,z
"The following must be specified for source type
TABLE
:
TABLENAME="table name
" RBDESCKEY="column name
" RBVALUEKEY="column name
" [SQL="SQL statement
"]/>
TYPE="EWEBEDITPRO"
<INPUTFORM
TYPE="EWEBEDITPRO
" [REQUIRED="YES|NO
"] [DEFAULT="default value
"] [MAXLENGTH="length
"] [INSTRUCTION="help for using the field
"] [HIDDEN="YES|NO
"] WIDTH="text box width
" HEIGHT="text box height
"/>
TYPE="ELEMENT"
<INPUTFORM
TYPE="ELEMENT
" [REQUIRED="YES|NO
"] [DEFAULT="default value
"] [INSTRUCTION="help for using the field
"] WIDTH="text box width
" />Parameters
Parameters for All Types
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 namedTEXT
. TEXTAREA A text box, with scroll bars, that accepts multiple lines of text. Corresponds to the HTML input type namedTEXTAREA
.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 forPROPERTY
NAME
that begins with the letters "url
" and set theSTORAGE
TYPE
toVARCHAR
. 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, Sites uploads the selected file and stores it in the file directory specified by theDEFDIR
parameter in theASSET
tag. (See ASSET.)When you specify that a field is an upload field, set a string forPROPERTY
NAME
that begins with the letters "url
" and setSTORAGE
TYPE
(the property's data type) toVARCHAR
. 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 typeSELECT
. 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 typeCHECKBOX
. This input type is ideally used for multiple value selections. 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 typeRADIO
. This input type is ideally used for single value selections. 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 forPROPERTY
NAME
that begins with the letters "url
" and setSTORAGE
TYPE
(the property's data type) toVARCHAR
. ELEMENT A field to call a custom element during the display of the form. ForContentForm
, the element is called from:OpenMarket/Xcelerate/AssetType/assettype/ContentForm/fieldnameForContentDetails
, the element is called fromOpenMarket/Xcelerate/AssetType/assettype/ContentDetails/fieldname/
The value you set for INPUTFORM TYPE
must be compatible with theSTORAGE
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
toYES
. WhenREQUIRED="YES"
, the field is marked in the Sites forms by the value of eitherMARKERTEXT
orMARKERIMAGE
(see ASSET) and Sites 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
, andEWEBEDITPRO
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 theLENGTH
value that you specified with theSTORAGE
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 theSTORAGE
tag.
INSTRUCTION (optional)
A short help message of up to 80 alphanumeric characters that appears near the field in the Sites New or Edit forms.
HIDDEN (optional)
Whether or not the field is to be kept hidden from the Sites 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.
TEXT Parameters
(TYPE="TEXT")
WIDTH (required)
- The width of the field in characters when it is displayed in the form. Corresponds to the HTML attribute
SIZE
.
TEXTAREA Parameters
(TYPE= "TEXTAREA")
WIDTH(required)
- The width of the text box in characters. For example,
WIDTH="48"
. Corresponds to the HTML attributeWIDTH.
HEIGHT (required)
- The height of the text box in lines. For example,
HEIGHT="4"
.
- Corresponds to the HTML attribute
HEIGHT
.
UPLOAD Parameters
(TYPE="UPLOAD")
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 ofUPLOAD
, AssetMaker expects to find a separate mimetype field. You create a separate mimetype field when yourUPLOAD
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 separatePROPERTY
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."
SELECT Parameters
(TYPE="SELECT")
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.
- To specify the options, set
SOURCETYPE
toSTRING
. and then use the next two parameters in this section (OPTIONDESCRIPTIONS
andOPTIONVALUES
).- To specify a query that obtains the list dynamically from a database table, set
SOURCETYPE
toTABLE
and then use the last four parameters in this section (TABLENAME
,OPTIONDESCKEY
,OPTIONVALUEKEY
, andSQL
).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 Sites 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",
andSOURCE="STRING"
. To specify that one of the values that can be entered in this field is 100,000, you specify "100000" as one of theOPTIONVALUES
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 Sites 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
, andOPTIONVALUEKEY
.
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 byOPTIONDESCKEY
andOPTIONVALUEKEY
.
CHECKBOX Parameters
(TYPE="CHECKBOX")
MULTIPLE (required)
- CheckBox should always have
MULTIPLE="YES"
. When this parameter is setMULTIPLE="YES"
, the field can hold more than one value.
SOURCETYPE (required)
- The source of the names listed next to the check boxes.
- To specify the names, set
SOURCETYPE
toSTRING
and then use the next two parameters (CBDESCRIPTIONS
andCBVALUES
).- To specify a query that obtains the names dynamically from a database table, set
SOURCETYPE
toTABLE
. and then use the last four parameters in this section (TABLENAME
,CBDESCKEY
,CBVALUEKEY
, andSQL
).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 Sites 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",
andSOURCE="STRING"
. To specify the value that can be entered in this field is 100,000, you specify "100000" as the value forOPTIONVALUES
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 Sites 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
, andCBVALUEKEY
.
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 byCBDESCKEY
andCBVALUEKEY
.
RADIO Parameters
(TYPE="RADIO")
SOURCETYPE (required)
- The source of the names listed next to the radio buttons.
- To specify the names, set
SOURCETYPE
toSTRING
.- To specify a query that obtains the names dynamically from a database table, set
SOURCETYPE
toTABLE
. and then use the last four parameters in this section (TABLENAME
,RBDESCKEY
,RBVALUEKEY
, andSQL
).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 Sites 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",
andSOURCE="STRING"
. To specify the value that can be entered in this field is 100,000, you specify "100000" as the value forOPTIONVALUES
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 Sites 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
, andRBVALUEKEY
.
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 byRBDESCKEY
andRBVALUEKEY
.
EWEBEDITPRO Parameters
(TYPE="EWEBEDITPRO")
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":
<PROPERTY NAME="title" DESCRIPTION="Title">
<STORAGE TYPE="VARCHAR" LENGTH="255"/> <INPUTFORM TYPE="TEXT" WIDTH="48" MAXLENGTH="44" REQUIRED="YES" DEFAULT="Enter the title here"/></PROPERTY>This code fragment creates a text box field named "Author's Note":
<PROPERTY NAME="authorsnote" DESCRIPTION="Author's Note">
<STORAGE TYPE="VARCHAR" LENGTH="125"/> <INPUTFORM TYPE="TEXTAREA" WIDTH="48" HEIGHT="2" MAXLENGTH="100" REQUIRED="YES" DEFAULT=""/></PROPERTY>This code fragment creates an upload field named "Thumbnail File":
<PROPERTY NAME="urlthumbnail" DESCRIPTION="Thumbnail File">
<STORAGE TYPE="VARCHAR" LENGTH="255"/> <INPUTFORM TYPE="UPLOAD" WIDTH="36" REQUIRED="NO" LINKTEXT="Image"/></PROPERTY>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:
<PROPERTY NAME="mimetype" DESCRIPTION="Mimetype">
<STORAGE TYPE="VARCHAR" LENGTH="36"/> <INPUTFORM TYPE="SELECT" SOURCETYPE="TABLE" TABLENAME="mimetype" OPTIONDESCKEY="description" OPTIONVALUEKEY="mimetype" SQL="SELECT mimetype, description FROM mimetype WHERE keyword = 'stylesheet' AND isdefault = 'y'"/></PROPERTY>This code fragment creates a select field that accepts multiple values from a drop-down field named "Credit Card Type":
<PROPERTY NAME="cardtype" DESCRIPTION="Credit Card Type">
<STORAGE TYPE="VARCHAR" LENGTH="48"/> <INPUTFORM TYPE="SELECT" MULTIPLE="YES" SOURCETYPE="TABLE" TABLENAME="CreditCard" OPTIONVALUEKEY="ccvalue" OPTIONDESCKEY="ccdescription" /></PROPERTY>This code fragment creates a set of check boxes named "Ground," "2nd Day," and "Next Day":
<PROPERTY NAME="shipping" DESCRIPTION="Shipping option">
<STORAGE TYPE="VARCHAR" LENGTH= "36"/> <INPUTFORM TYPE="CHECKBOX" MULTIPLE="YES" SOURCETYPE="STRING" CBDESCRIPTIONS="Ground, 2nd Day, Next Day" CBVALUES="O,1,2"/></PROPERTY>This code fragment creates a set of a radio options "Ground," "2nd Day," and "Next Day":
<PROPERTY NAME="shipping" DESCRIPTION="Shipping option">
<STORAGE TYPE="VARCHAR" LENGTH= "36"/> <INPUTFORM TYPE="RADIO" SOURCETYPE="STRING" RBDESCRIPTIONS="Ground, 2nd Day, Next Day" RBVALUES="O,1,2"/></PROPERTY>This code fragment creates an eWebEditPro field named "urlbody":
<PROPERTY NAME="urlbody" DESCRIPTION="Body">
<STORAGE TYPE="VARCHAR" LENGTH="500"/> <INPUTFORM TYPE="EWEBEDITPRO" WIDTH="300" HEIGHT="300" REQUIRED="YES" INSTRUCTION="Be concise! No more than 3 paragraphs."/> <SEARCHFORM TYPE="TEXTAREA" DESCRIPTION="Body Contains:"/></PROPERTY>A Text Field With Embedded Links.
You can allow content editors to embed hyperlinks within a text field. If embedded links
are enabled for a text field, two embedded link buttons—Add Link and Include—appear
next to the field. To enable embedded links for a text field, code the property statement as follows:
1. The string set forPROPERTY NAME
must begin with the letters url.
2. The value forSTORAGE TYPE
must be set toVARCHAR
.
3. The value forINPUT TYPE
must be set toTEXTAREA
.
<PROPERTY NAME="urltext" DESCRIPTION="Text"> <STORAGE TYPE="VARCHAR" LENGTH="2000"/> <INPUTFORM TYPE="TEXTAREA" WIDTH="48" HEIGHT="25" EMBEDDEDLINKS=”YES” REQUIRED="YES"/> </PROPERTY> </PROPERTY>
Home > Contents > Index > ![]()
Oracle Miscellaneous Reference
Copyright (c) 2013, 2018, Oracle and/or its affiliates. All rights reserved.