The Web Form Editor allows to create an interactive interface between a script that runs on Tradium Web Portal and the remote connected Tradium Web Portal user. It serves as an alternative to the standard Dialog Editor that is widely used in the Tradium Basic Script environment.
The lay-out of a Web Form consists of one or more input controls and one, two or three buttons for submitting, resetting of cancelation of the input. Each type of the input control is explained below:
You can set the title of the form in the upper text box, which defaults to "Tradium Web Form". To add controls, select the control in the drop-down box and click on the "Add" button. To remove a control, select it and click on the "Del" button. You can add up to 16 controls in one Web Form. After inserting the controls you can rearrange them by using the "Up" and "Down" buttons.
|
IMPORTANT: WebSessionID
When running a script from the Tradium Web Portal, a special global variable needs to be initialised at the beginning of the main script, WebSessionID. This contains the unique id of the user's online session of the webbrowser. Each script runs autonomously on the local database server via the Tradium e-Comms Server software.. It communicates with the user thru this id.
Whenever a script run is initated from the Tradium Web Portal, the Command$ variable begins with the session id, followed by a space (Hex char 20) and eventually specified command line parameters.
When testing a script, Tradium does not require the use of WebSessionID, however, it should always be implemented in the script as shown in this example.
|
|
'zoek naar opmaak definitie (controltype,caption,value,listtems, controltype,caption,value,listtems, ..., controltype,caption,value,listtems)
'Result = RunWebForm("0#Tradium Web Form##Zenden|Reset|Annuleren#" & _
' "6#Invoerdatum#2012-06-21#2010-01-01|2020-12-31|06#" & _
' "2#Land#Nederland#Nederland|België|Frankrijk#" & _
' "5#Opmerking#Dit is een test \n op de tweede regel#3#" & _
' "1#Naam#Van Dalen#text|50#" & _
' "3#Bezorgoptie#Direct#Afhalen|Bezorgen|Direct#" & _
' "4#Vooruitbetaling#True##")
'Formdata:
' controltype = Form definition (0)
' caption = Tradium Web form
' value = n/a
' listitems = "Zenden|Reset|Annuleren"
' controltype = Datepicker (6)
' caption = Invoerdatum
' value = 2012-06-21
' listitems = valid range from 2010-01-01 to 2020-12-31, Disabled days of the week: 0 and 6
' controltype = dropdownbox (2)
' caption = Land
' value = Nederland
' listitems = 3, "Nederland", "België" and "Frankrijk"
' controltype = text/area (5)
' caption = Opmerking
' value = "Dit is een test" & vbnewline & "op de tweede regel" --take notice that the character sequence " \n " means new-line
' listitems = 3|512, the number of rows visible in the control, followed by the maxlength (512)
' controltype = inputbox (1)
' caption = Name
' value = "Van Dalen"
' listitems = "text|50", the type of input, options are: "password", "number", "text", "url", "email", "phone", "color", followed by Maxlength (50)
' controltype = optiongroep (3)
' caption = Bezorgoptie
' value = "Direct"
' listitems = "Direct","Afhalen" and "Direct"
' controltype = checkbox (4)
' caption = Vooruitbetaling
' value = True
' listitems = n/a
|