azeaze

Php code posted
created at 05 Jun 09:37

Edit | Back
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
    $parameters:=New collection(\
    New object("type";"bool";"name";"testb";"default";True);\
    New object("type";"integer";"name";"rate";"label";"Your rating";"format";"rating";"default";5;"min";1;"max";5)\
    New object("type";"string";"name";"comment";"format";"textArea";"maxLength";200;"defaultField";"Author";"mandatory";True);\
    New object("type";"string";"name";"email";"format";"email");\
    New object("type";"string";"name";"zipCode";"format";"zipCode");\
    New object("type";"string";"name";"password";"format";"password";"rules";New collection("mandatory";New object("minLength";8)));\
    New object("type";"string";"name";"url";"format";"url");\
    New object("type";"integer";"name";"integer";"format";"spellOut";"rules";New collection("mandatory";New object("min";5)));\
    New object("type";"integer";"name";"scientific";"format";"scientific");\
    New object("type";"integer";"name";"energy";"format";"energy");\
    New object("type";"integer";"name";"mass";"format";"mass");\
    New object("type";"date";"name";"date";"label";"Your date");\
    New object("type";"image";"name";"image";"label";"Your image");\
    )
    
      // resend all provided data as default value
    C_OBJECT($parameter)
    For each ($parameter;$parameters)
      
      If ($request.parameters[$parameter.name]#Null)
        $parameter.default:=$request.parameters[$parameter.name]
      End if 
      
    End for each 
    
      // response to make a new action form
    $response:=New object(\
    "name";"neverEnd";\
    "scope";"table";\
    "shortLabel";"NeverEnd";\
    "label";"never end form";\
    "tableNumber";1;\
    "icon";"action_rate";\
    "parameters";$parameters)
1.62 KB in 16 ms with coderay