×
Menu
Index

4.1.1. text / read_text

 
Standard input field for text. In most cases there is also a label in front of the input field. It is also possible to add a tooltip which shall appear when you hover above the input box.
 
The definition is send to BOA in the labels section of the form. Each element is a json object in the labels array.
 
Text element
 

Label definition

 
{
"display": "Name / Company:",
"tooltip": "Name of the customer.",
"fieldname": "naam",
"length": 40,
"inputtype": "text",
"block": 1,
"newline": true,
"labelwidth": 2,
"fieldwidth": 4
},
{
"display": "Contact:",
"tooltip": "Name of contact person.",
"fieldname": "naam2",
"length": 40,
"inputtype": "text",
"block": 1,
"newline": false,
"labelwidth": 2,
"fieldwidth": 4
},
 
 
  • display: label to display in front of the input box.
  • tooltip: help text to display when you hover above the input box.
  • fieldname: defines the name of the data field.
  • lenght: maximum length of the field. BOA will check this and gives a message when the lenght is exceeded.
  • inputtype: text
  • block: the block number in which this should be displayed.
  • newline: if true it starts on a new line in the form, otherwise it stays on the same line.
  • labelwidth: width in columns of the label test.
  • fieldwidth: width in columns to be used for the input box.
     
 
 
 
Text elements as defined above.
 
There is also the read_text option as inputtype. In that case the text is shown, but can't be edited.
 
read_text sample, edit is not possible.
 

Validations

 
You can use client side validation or server side validation. See the chapter 4.3 about this.