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 | === Functions 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"/}} / {{jsdoc page="jquery" name="showStar"/}} | ||
| 16 | * {{jsdoc page="jquery" name="appointmentPicker"/}} | ||
| 17 | * {{jsdoc page="jquery" name="autocompleteDB"/}} / {{jsdoc page="jquery" name="autocompleteLDAP"/}} | ||
| 18 | * {{jsdoc page="jquery" name="autonumeric"/}} | ||
| 19 | * {{jsdoc page="jquery" name="clear"/}} | ||
| 20 | * {{jsdoc page="jquery" name="cob2auto"/}} | ||
| 21 | * {{jsdoc page="jquery" name="dynamic"/}} | ||
| 22 | * {{jsdoc page="jquery" name="error"/}} | ||
| 23 | * {{jsdoc page="jquery" name="errorFunc"/}} | ||
| 24 | * {{jsdoc page="jquery" name="getContainer"/}} | ||
| 25 | * {{jsdoc page="jquery" name="getLabel"/}} | ||
| 26 | * {{jsdoc page="jquery" name="hasAttr"/}} | ||
| 27 | * {{jsdoc page="jquery" name="jSignature"/}} | ||
| 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="ajaxUploadManager"/}} | ||
| 52 | * {{jsdoc page="xutil" name="getDataQuery"/}} | ||
| 53 | * {{jsdoc page="xutil" name="getFormParam"/}} | ||
| 54 | * {{jsdoc page="xutil" name="getFormUrl"/}} | ||
| 55 | * {{jsdoc page="xutil" name="getLdapQuery"/}} | ||
| 56 | * {{jsdoc page="xutil" name="isStatus"/}} | ||
| 57 | * {{jsdoc page="xutil" name="onPrint"/}} | ||
| 58 | * {{jsdoc page="xutil" name="onStatus"/}} | ||
| 59 | * {{jsdoc page="xutil" name="onSubmit"/}} | ||
| 60 | |||
| 61 | === window === | ||
| 62 | |||
| 63 | These functions and objects are available in the global window scope: | ||
| 64 | |||
| 65 | {{code language="javascript"}} | ||
| 66 | // Go to the page named "p2" | ||
| 67 | gotoPage("p2"); | ||
| 68 | {{/code}} | ||
| 69 | |||
| 70 | * {{jsdoc page="window" name="getProjektId"/}} | ||
| 71 | * {{jsdoc page="window" name="getURLParameter"/}} | ||
| 72 | * {{jsdoc page="window" name="gotoPage"/}} | ||
| 73 | * {{jsdoc page="window" name="setValidate"/}} | ||
| 74 | * {{jsdoc page="window" name="xm_validator"/}} | ||
| 75 | * {{jsdoc page="window" name="XFC_METADATA"/}} | ||
| 76 | * {{jsdoc page="window" name="XM_FORM_I18N"/}} | ||
| 77 | * {{jsdoc page="window" name="XM_FORM_MODEL"/}} | ||
| 78 | * {{jsdoc page="window" name="XM_FORM_VRULES"/}} | ||
| 79 | * {{jsdoc page="window" name="XM_FORM_PLUGIN_VRULES"/}} |