form

form

form

Manages common form functions

Metadata

HTMLSafe()

Coverts special characters to character entities, making a string safe for display in HTML.

Arguments

Name Type Required Default Options Description
string string Yes string to convert

renderDateSelect()

returns populated day-month-year selectboxes.

Arguments

Name Type Required Default Options Description
startYear String No [runtime expression] Year range - minimum
endYear String No [runtime expression] Year range - maximum
selectedYear String No [runtime expression] Current selected year
selectedMonth String No [runtime expression] Current selected month
selectedday String No [runtime expression] Current selected day
elementNamePrefix String No form element names are named day,month,and year - this argument will prefix those names
bDisplayMonthAsString String No 1 Displays month as string as opposed to numerical equivalent
bDisplayTime String No 0 Display hours and minutes as well as dd mm yyyy
selectedhour String No [runtime expression] Current selected hour
selectedminute String No [runtime expression] Current selected minute
selectedDate String No If this is provided, will override any other selections passed in

renderDynamicCheckBox()

Renders check boxes that are populated by a query

Arguments

Name Type Required Default Options Description
name String Yes The name of the form element
qData String No
numrows String No 4 This is the number of checkboxes per row to display
lSelectedValues String No The values which are selected by default
valueColumn String No objectID This is the query column to evaluate for option values - should generally be objectID though
displayColumn String No title This is the query column to evaluate for option displau values

renderFileField()

Returns a file upload field - with a link to the file if it has been uploaded

Arguments

Name Type Required Default Options Description
fieldname String Yes
filepath String Yes This assumes folder path relative to the application.defaultfilepath dir
filename String No

renderHiddenIframe()

Returns the html code to place a hidden iframe on a page

Arguments

Name Type Required Default Options Description
iframeID String No idServer
bHideFrame String Yes false

renderSelectBox()

Renders a select box that is populated by a query

Arguments

Name Type Required Default Options Description
name String Yes The name of the form element
qData String Yes
lSelectedValues String No The values which are selected by default
valueColumn String No objectID This is the query column to evaluate for option values - should generally be objectID though
displayColumn String No title This is the query column to evaluate for option displau values
defaultMsg String No Please Make Selection This is the default mesage in the select box when no records are selected
onChangeJS String No

renderTextArea()

Renders a form text element

Arguments

Name Type Required Default Options Description
name String Yes The name of the form element
value String No The value to display in this text field
length numeric No 50

renderTextBox()

Renders a form text element

Arguments

Name Type Required Default Options Description
name String Yes The name of the form element
value String No The value to display in this text field
length numeric No 250
size numeric No 70

sanitiseFileName()

Arguments

Name Type Required Default Options Description
serverfile String Yes
clientfilename String Yes
serverDirectory String Yes

uploadFile()

Uploads a file

Arguments

Name Type Required Default Options Description
formField string Yes The name of the field that contains the file to be uploaded
destination string No [runtime expression] Directory file is to be uploaded to - must pass in absolute path
nameconflict string No [runtime expression] File write behavior
accept string No File types to accept