Wiki source code of JavaScript-API (Script-Funktionen)
Show last authors
author | version | line-number | content |
---|---|---|---|
1 | {{formcycle/}} provides a multitude of objects and utility functions to help you with creating complex forms easily. | ||
2 | |||
3 | Please refer to the help pages that are available for each release of FORMCYCLE at [[https:~~/~~/docs.formcycle.eu>>https://docs.formcycle.eu||rel="noopener noreferrer" target="_blank"]] | ||
4 | |||
5 | === Functins on jQuery objects === | ||
6 | |||
7 | These functions are called directly on form and HTML elements that were selected with jQuery: | ||
8 | |||
9 | {{code language="javascript"}} | ||
10 | // Hide the form field named "tfZip" | ||
11 | $("[name='tfZip']").visible(false); | ||
12 | {{/code}} | ||
13 | |||
14 | * {{jsdoc page="jquery" name="on"}}addRow and delRow event{{/jsdoc}} | ||
15 | * {{jsdoc page="jquery" name="addstar"/}} / {{jsdoc page="jquery" name="removestar"/}} | ||
16 | * {{jsdoc page="jquery" name="autocompletedb"/}} / {{jsdoc page="jquery" name="autocompleteldap"/}} | ||
17 | * {{jsdoc page="jquery" name="autonumeric"/}} | ||
18 | * {{jsdoc page="jquery" name="clear"/}} | ||
19 | * {{jsdoc page="jquery" name="cob2auto"/}} | ||
20 | * {{jsdoc page="jquery" name="dynamic"/}} | ||
21 | * {{jsdoc page="jquery" name="error"/}} | ||
22 | * {{jsdoc page="jquery" name="errorfunc"/}} | ||
23 | * {{jsdoc page="jquery" name="getcontainer"/}} | ||
24 | * {{jsdoc page="jquery" name="getlabel"/}} | ||
25 | * {{jsdoc page="jquery" name="hasattr"/}} | ||
26 | * {{jsdoc page="jquery" name="jsignature"/}} | ||
27 | * {{jsdoc page="jquery" name="replaceparams"/}} | ||
28 | * {{jsdoc page="jquery" name="setdatatype"/}} | ||
29 | * {{jsdoc page="jquery" name="seterror"/}} | ||
30 | * {{jsdoc page="jquery" name="setgroupreq"/}} | ||
31 | * {{jsdoc page="jquery" name="setmincheckbox"/}} / {{jsdoc page="jquery" name="setmaxcheckbox"/}} | ||
32 | * {{jsdoc page="jquery" name="setminlength"/}} / {{jsdoc page="jquery" name="setmaxlength"/}} | ||
33 | * {{jsdoc page="jquery" name="setminvalue"/}} / {{jsdoc page="jquery" name="setmaxvalue"/}} | ||
34 | * {{jsdoc page="jquery" name="setmustequal"/}} | ||
35 | * {{jsdoc page="jquery" name="setrequired"/}} | ||
36 | * {{jsdoc page="jquery" name="setrequiredif"/}} | ||
37 | * {{jsdoc page="jquery" name="sum"/}} | ||
38 | * {{jsdoc page="jquery" name="validate"/}} | ||
39 | * {{jsdoc page="jquery" name="visible"/}} | ||
40 | |||
41 | === xutil === | ||
42 | |||
43 | These functions and properties are available in the global object {{code language="javascript"}}$.xutil{{/code}}: | ||
44 | |||
45 | {{code language="javascript"}} | ||
46 | // Returns the URL for accessing a CSV data source (as configured in the backend) | ||
47 | // For example "/formcycle/datenquellecsv/" | ||
48 | $.xutil.getFormUrl("datasource_csv") | ||
49 | {{/code}} | ||
50 | |||
51 | * {{jsdoc page="xutil" name="getdataquery"/}} | ||
52 | * {{jsdoc page="xutil" name="getformparam"/}} | ||
53 | * {{jsdoc page="xutil" name="getformurl"/}} | ||
54 | * {{jsdoc page="xutil" name="getldapquery"/}} | ||
55 | * {{jsdoc page="xutil" name="isstatus"/}} | ||
56 | * {{jsdoc page="xutil" name="onstatus"/}} | ||
57 | * {{jsdoc page="xutil" name="onsubmit"/}} | ||
58 | |||
59 | === window === | ||
60 | |||
61 | These functions and objects are available in the global window scope: | ||
62 | |||
63 | {{code language="javascript"}} | ||
64 | // Go to the page named "p2" | ||
65 | gotoPage("p2"); | ||
66 | {{/code}} | ||
67 | |||
68 | * {{jsdoc page="window" name="getprojektid"/}} | ||
69 | * {{jsdoc page="window" name="geturlparameter"/}} | ||
70 | * {{jsdoc page="window" name="gotopage"/}} | ||
71 | * {{jsdoc page="window" name="setvalidate"/}} | ||
72 | * {{jsdoc page="window" name="xm_validator"/}} |