3 <html lang=
"en" class=
"no-js">
7 <meta name=
"viewport" content=
"width=device-width,initial-scale=1">
12 <link rel=
"shortcut icon" href=
"../../../../assets/default.favicon.ico">
13 <meta name=
"generator" content=
"mkdocs-1.1.2, mkdocs-material-7.0.3">
17 <title>Fields - WoltLab Suite Documentation
</title>
21 <link rel=
"stylesheet" href=
"../../../../assets/stylesheets/main.1655a90d.min.css">
24 <link rel=
"stylesheet" href=
"../../../../assets/stylesheets/palette.7fa14f5b.min.css">
28 <meta name=
"theme-color" content=
"#009485">
37 <link rel=
"stylesheet" href=
"../../../../stylesheets/extra.css">
51 <body dir=
"ltr" data-md-color-scheme=
"" data-md-color-primary=
"teal" data-md-color-accent=
"">
55 <input class=
"md-toggle" data-md-toggle=
"drawer" type=
"checkbox" id=
"__drawer" autocomplete=
"off">
56 <input class=
"md-toggle" data-md-toggle=
"search" type=
"checkbox" id=
"__search" autocomplete=
"off">
57 <label class=
"md-overlay" for=
"__drawer"></label>
58 <div data-md-component=
"skip">
61 <a href=
"#form-builder-fields" class=
"md-skip">
66 <div data-md-component=
"announce">
68 <aside class=
"md-announce">
69 <div class=
"md-announce__inner md-grid md-typeset">
71 <a href=
"https://www.woltlab.com">Back to
<strong>woltlab.com
</strong></a>
80 <header class=
"md-header" data-md-component=
"header">
81 <nav class=
"md-header__inner md-grid" aria-label=
"Header">
82 <a href=
"../../../.." title=
"WoltLab Suite Documentation" class=
"md-header__button md-logo" aria-label=
"WoltLab Suite Documentation">
84 <img src=
"../../../../assets/logo.png" alt=
"logo">
87 <label class=
"md-header__button md-icon" for=
"__drawer">
88 <svg xmlns=
"http://www.w3.org/2000/svg" viewBox=
"0 0 24 24"><path d=
"M3 6h18v2H3V6m0 5h18v2H3v-2m0 5h18v2H3v-2z"/></svg>
90 <div class=
"md-header__title" data-md-component=
"header-title">
91 <div class=
"md-header__ellipsis">
92 <div class=
"md-header__topic">
93 <span class=
"md-ellipsis">
94 WoltLab Suite Documentation
97 <div class=
"md-header__topic" data-md-component=
"header-topic">
98 <span class=
"md-ellipsis">
106 <div class=
"md-header__options">
110 <label class=
"md-header__button md-icon" for=
"__search">
111 <svg xmlns=
"http://www.w3.org/2000/svg" viewBox=
"0 0 24 24"><path d=
"M9.5 3A6.5 6.5 0 0 1 16 9.5c0 1.61-.59 3.09-1.56 4.23l.27.27h.79l5 5-1.5 1.5-5-5v-.79l-.27-.27A6.516 6.516 0 0 1 9.5 16 6.5 6.5 0 0 1 3 9.5 6.5 6.5 0 0 1 9.5 3m0 2C7 5 5 7 5 9.5S7 14 9.5 14 14 12 14 9.5 12 5 9.5 5z"/></svg>
114 <div class=
"md-search" data-md-component=
"search" role=
"dialog">
115 <label class=
"md-search__overlay" for=
"__search"></label>
116 <div class=
"md-search__inner" role=
"search">
117 <form class=
"md-search__form" name=
"search">
118 <input type=
"text" class=
"md-search__input" name=
"query" aria-label=
"Search" placeholder=
"Search" autocapitalize=
"off" autocorrect=
"off" autocomplete=
"off" spellcheck=
"false" data-md-component=
"search-query" data-md-state=
"active" required
>
119 <label class=
"md-search__icon md-icon" for=
"__search">
120 <svg xmlns=
"http://www.w3.org/2000/svg" viewBox=
"0 0 24 24"><path d=
"M9.5 3A6.5 6.5 0 0 1 16 9.5c0 1.61-.59 3.09-1.56 4.23l.27.27h.79l5 5-1.5 1.5-5-5v-.79l-.27-.27A6.516 6.516 0 0 1 9.5 16 6.5 6.5 0 0 1 3 9.5 6.5 6.5 0 0 1 9.5 3m0 2C7 5 5 7 5 9.5S7 14 9.5 14 14 12 14 9.5 12 5 9.5 5z"/></svg>
121 <svg xmlns=
"http://www.w3.org/2000/svg" viewBox=
"0 0 24 24"><path d=
"M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11h12z"/></svg>
123 <button type=
"reset" class=
"md-search__icon md-icon" aria-label=
"Clear" tabindex=
"-1">
124 <svg xmlns=
"http://www.w3.org/2000/svg" viewBox=
"0 0 24 24"><path d=
"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z"/></svg>
127 <div class=
"md-search__output">
128 <div class=
"md-search__scrollwrap" data-md-scrollfix
>
129 <div class=
"md-search-result" data-md-component=
"search-result">
130 <div class=
"md-search-result__meta">
133 <ol class=
"md-search-result__list"></ol>
144 <div class=
"md-container" data-md-component=
"container">
149 <main class=
"md-main" data-md-component=
"main">
150 <div class=
"md-main__inner md-grid">
154 <div class=
"md-sidebar md-sidebar--primary" data-md-component=
"sidebar" data-md-type=
"navigation" >
155 <div class=
"md-sidebar__scrollwrap">
156 <div class=
"md-sidebar__inner">
162 <nav class=
"md-nav md-nav--primary" aria-label=
"Navigation" data-md-level=
"0">
163 <label class=
"md-nav__title" for=
"__drawer">
164 <a href=
"../../../.." title=
"WoltLab Suite Documentation" class=
"md-nav__button md-logo" aria-label=
"WoltLab Suite Documentation">
166 <img src=
"../../../../assets/logo.png" alt=
"logo">
169 WoltLab Suite Documentation
172 <ul class=
"md-nav__list" data-md-scrollfix
>
181 <li class=
"md-nav__item">
182 <a href=
"../../../../getting-started/" class=
"md-nav__link">
199 <li class=
"md-nav__item md-nav__item--active md-nav__item--nested">
202 <input class=
"md-nav__toggle md-toggle" data-md-toggle=
"__nav_2" type=
"checkbox" id=
"__nav_2" checked
>
204 <label class=
"md-nav__link" for=
"__nav_2">
206 <span class=
"md-nav__icon md-icon"></span>
208 <nav class=
"md-nav" aria-label=
"PHP API" data-md-level=
"1">
209 <label class=
"md-nav__title" for=
"__nav_2">
210 <span class=
"md-nav__icon md-icon"></span>
213 <ul class=
"md-nav__list" data-md-scrollfix
>
219 <li class=
"md-nav__item">
220 <a href=
"../../../pages/" class=
"md-nav__link">
231 <li class=
"md-nav__item">
232 <a href=
"../../../database-objects/" class=
"md-nav__link">
243 <li class=
"md-nav__item">
244 <a href=
"../../../database-access/" class=
"md-nav__link">
255 <li class=
"md-nav__item">
256 <a href=
"../../../exceptions/" class=
"md-nav__link">
270 <li class=
"md-nav__item md-nav__item--active md-nav__item--nested">
273 <input class=
"md-nav__toggle md-toggle" data-md-toggle=
"__nav_2_5" type=
"checkbox" id=
"__nav_2_5" checked
>
275 <label class=
"md-nav__link" for=
"__nav_2_5">
277 <span class=
"md-nav__icon md-icon"></span>
279 <nav class=
"md-nav" aria-label=
"API" data-md-level=
"2">
280 <label class=
"md-nav__title" for=
"__nav_2_5">
281 <span class=
"md-nav__icon md-icon"></span>
284 <ul class=
"md-nav__list" data-md-scrollfix
>
290 <li class=
"md-nav__item">
291 <a href=
"../../caches/" class=
"md-nav__link">
302 <li class=
"md-nav__item">
303 <a href=
"../../comments/" class=
"md-nav__link">
314 <li class=
"md-nav__item">
315 <a href=
"../../cronjobs/" class=
"md-nav__link">
326 <li class=
"md-nav__item">
327 <a href=
"../../events/" class=
"md-nav__link">
341 <li class=
"md-nav__item md-nav__item--active md-nav__item--nested">
344 <input class=
"md-nav__toggle md-toggle" data-md-toggle=
"__nav_2_5_5" type=
"checkbox" id=
"__nav_2_5_5" checked
>
346 <label class=
"md-nav__link" for=
"__nav_2_5_5">
348 <span class=
"md-nav__icon md-icon"></span>
350 <nav class=
"md-nav" aria-label=
"Form Builder" data-md-level=
"3">
351 <label class=
"md-nav__title" for=
"__nav_2_5_5">
352 <span class=
"md-nav__icon md-icon"></span>
355 <ul class=
"md-nav__list" data-md-scrollfix
>
361 <li class=
"md-nav__item">
362 <a href=
"../overview/" class=
"md-nav__link">
373 <li class=
"md-nav__item">
374 <a href=
"../structure/" class=
"md-nav__link">
387 <li class=
"md-nav__item md-nav__item--active">
389 <input class=
"md-nav__toggle md-toggle" data-md-toggle=
"toc" type=
"checkbox" id=
"__toc">
394 <label class=
"md-nav__link md-nav__link--active" for=
"__toc">
396 <span class=
"md-nav__icon md-icon"></span>
399 <a href=
"./" class=
"md-nav__link md-nav__link--active">
404 <nav class=
"md-nav md-nav--secondary" aria-label=
"Table of contents">
410 <label class=
"md-nav__title" for=
"__toc">
411 <span class=
"md-nav__icon md-icon"></span>
414 <ul class=
"md-nav__list" data-md-component=
"toc" data-md-scrollfix
>
416 <li class=
"md-nav__item">
417 <a href=
"#abstract-form-fields" class=
"md-nav__link">
421 <nav class=
"md-nav" aria-label=
"Abstract Form Fields">
422 <ul class=
"md-nav__list">
424 <li class=
"md-nav__item">
425 <a href=
"#abstractformfield" class=
"md-nav__link">
431 <li class=
"md-nav__item">
432 <a href=
"#abstractnumericformfield" class=
"md-nav__link">
433 AbstractNumericFormField
443 <li class=
"md-nav__item">
444 <a href=
"#general-form-fields" class=
"md-nav__link">
448 <nav class=
"md-nav" aria-label=
"General Form Fields">
449 <ul class=
"md-nav__list">
451 <li class=
"md-nav__item">
452 <a href=
"#booleanformfield" class=
"md-nav__link">
458 <li class=
"md-nav__item">
459 <a href=
"#checkboxformfield" class=
"md-nav__link">
465 <li class=
"md-nav__item">
466 <a href=
"#classnameformfield" class=
"md-nav__link">
472 <li class=
"md-nav__item">
473 <a href=
"#dateformfield" class=
"md-nav__link">
479 <li class=
"md-nav__item">
480 <a href=
"#descriptionformfield" class=
"md-nav__link">
486 <li class=
"md-nav__item">
487 <a href=
"#emailformfield" class=
"md-nav__link">
493 <li class=
"md-nav__item">
494 <a href=
"#floatformfield" class=
"md-nav__link">
500 <li class=
"md-nav__item">
501 <a href=
"#iconformfield" class=
"md-nav__link">
507 <li class=
"md-nav__item">
508 <a href=
"#integerformfield" class=
"md-nav__link">
514 <li class=
"md-nav__item">
515 <a href=
"#isdisabledformfield" class=
"md-nav__link">
521 <li class=
"md-nav__item">
522 <a href=
"#itemlistformfield" class=
"md-nav__link">
528 <li class=
"md-nav__item">
529 <a href=
"#multilinetextformfield" class=
"md-nav__link">
530 MultilineTextFormField
535 <li class=
"md-nav__item">
536 <a href=
"#multipleselectionformfield" class=
"md-nav__link">
537 MultipleSelectionFormField
542 <li class=
"md-nav__item">
543 <a href=
"#radiobuttonformfield" class=
"md-nav__link">
549 <li class=
"md-nav__item">
550 <a href=
"#ratingformfield" class=
"md-nav__link">
556 <li class=
"md-nav__item">
557 <a href=
"#showorderformfield" class=
"md-nav__link">
563 <li class=
"md-nav__item">
564 <a href=
"#singleselectionformfield" class=
"md-nav__link">
565 SingleSelectionFormField
570 <li class=
"md-nav__item">
571 <a href=
"#sortorderformfield" class=
"md-nav__link">
577 <li class=
"md-nav__item">
578 <a href=
"#textformfield" class=
"md-nav__link">
584 <li class=
"md-nav__item">
585 <a href=
"#titleformfield" class=
"md-nav__link">
591 <li class=
"md-nav__item">
592 <a href=
"#urlformfield" class=
"md-nav__link">
603 <li class=
"md-nav__item">
604 <a href=
"#specific-fields" class=
"md-nav__link">
608 <nav class=
"md-nav" aria-label=
"Specific Fields">
609 <ul class=
"md-nav__list">
611 <li class=
"md-nav__item">
612 <a href=
"#aclformfield" class=
"md-nav__link">
618 <li class=
"md-nav__item">
619 <a href=
"#buttonformfield" class=
"md-nav__link">
625 <li class=
"md-nav__item">
626 <a href=
"#captchaformfield" class=
"md-nav__link">
632 <li class=
"md-nav__item">
633 <a href=
"#contentlanguageformfield" class=
"md-nav__link">
634 ContentLanguageFormField
639 <li class=
"md-nav__item">
640 <a href=
"#labelformfield" class=
"md-nav__link">
646 <li class=
"md-nav__item">
647 <a href=
"#optionformfield" class=
"md-nav__link">
653 <li class=
"md-nav__item">
654 <a href=
"#simpleaclformfield" class=
"md-nav__link">
660 <li class=
"md-nav__item">
661 <a href=
"#singlemediaselectionformfield" class=
"md-nav__link">
662 SingleMediaSelectionFormField
667 <li class=
"md-nav__item">
668 <a href=
"#tagformfield" class=
"md-nav__link">
674 <li class=
"md-nav__item">
675 <a href=
"#uploadformfield" class=
"md-nav__link">
679 <nav class=
"md-nav" aria-label=
"UploadFormField">
680 <ul class=
"md-nav__list">
682 <li class=
"md-nav__item">
683 <a href=
"#provide-value-from-database-object" class=
"md-nav__link">
684 Provide value from database object
689 <li class=
"md-nav__item">
690 <a href=
"#process-files" class=
"md-nav__link">
701 <li class=
"md-nav__item">
702 <a href=
"#userformfield" class=
"md-nav__link">
708 <li class=
"md-nav__item">
709 <a href=
"#userpasswordfield" class=
"md-nav__link">
715 <li class=
"md-nav__item">
716 <a href=
"#usergroupoptionformfield" class=
"md-nav__link">
717 UserGroupOptionFormField
722 <li class=
"md-nav__item">
723 <a href=
"#usernameformfield" class=
"md-nav__link">
734 <li class=
"md-nav__item">
735 <a href=
"#wysiwyg-form-container" class=
"md-nav__link">
736 Wysiwyg form container
739 <nav class=
"md-nav" aria-label=
"Wysiwyg form container">
740 <ul class=
"md-nav__list">
742 <li class=
"md-nav__item">
743 <a href=
"#wysiwygattachmentformfield" class=
"md-nav__link">
744 WysiwygAttachmentFormField
749 <li class=
"md-nav__item">
750 <a href=
"#wysiwygpollformcontainer" class=
"md-nav__link">
751 WysiwygPollFormContainer
756 <li class=
"md-nav__item">
757 <a href=
"#wysiwygsmileyformcontainer" class=
"md-nav__link">
758 WysiwygSmileyFormContainer
761 <nav class=
"md-nav" aria-label=
"WysiwygSmileyFormContainer">
762 <ul class=
"md-nav__list">
764 <li class=
"md-nav__item">
765 <a href=
"#wysiwygsmileyformnode" class=
"md-nav__link">
766 WysiwygSmileyFormNode
776 <li class=
"md-nav__item">
777 <a href=
"#example" class=
"md-nav__link">
783 <li class=
"md-nav__item">
784 <a href=
"#wysiwygformfield" class=
"md-nav__link">
790 <li class=
"md-nav__item">
791 <a href=
"#twysiwygformnode" class=
"md-nav__link">
802 <li class=
"md-nav__item">
803 <a href=
"#single-use-form-fields" class=
"md-nav__link">
804 Single-Use Form Fields
807 <nav class=
"md-nav" aria-label=
"Single-Use Form Fields">
808 <ul class=
"md-nav__list">
810 <li class=
"md-nav__item">
811 <a href=
"#bbcodeattributesformfield" class=
"md-nav__link">
812 BBCodeAttributesFormField
817 <li class=
"md-nav__item">
818 <a href=
"#devtoolsprojectexcludedpackagesformfield" class=
"md-nav__link">
819 DevtoolsProjectExcludedPackagesFormField
824 <li class=
"md-nav__item">
825 <a href=
"#devtoolsprojectinstructionsformfield" class=
"md-nav__link">
826 DevtoolsProjectInstructionsFormField
831 <li class=
"md-nav__item">
832 <a href=
"#devtoolsprojectoptionalpackagesformfield" class=
"md-nav__link">
833 DevtoolsProjectOptionalPackagesFormField
838 <li class=
"md-nav__item">
839 <a href=
"#devtoolsprojectrequiredpackagesformfield" class=
"md-nav__link">
840 DevtoolsProjectRequiredPackagesFormField
862 <li class=
"md-nav__item">
863 <a href=
"../validation_data/" class=
"md-nav__link">
874 <li class=
"md-nav__item">
875 <a href=
"../dependencies/" class=
"md-nav__link">
892 <li class=
"md-nav__item">
893 <a href=
"../../package_installation_plugins/" class=
"md-nav__link">
894 Package Installation Plugins
904 <li class=
"md-nav__item">
905 <a href=
"../../user_activity_points/" class=
"md-nav__link">
916 <li class=
"md-nav__item">
917 <a href=
"../../user_notifications/" class=
"md-nav__link">
928 <li class=
"md-nav__item">
929 <a href=
"../../sitemaps/" class=
"md-nav__link">
946 <li class=
"md-nav__item">
947 <a href=
"../../../code-style/" class=
"md-nav__link">
958 <li class=
"md-nav__item">
959 <a href=
"../../../apps/" class=
"md-nav__link">
970 <li class=
"md-nav__item">
971 <a href=
"../../../gdpr/" class=
"md-nav__link">
992 <li class=
"md-nav__item md-nav__item--nested">
995 <input class=
"md-nav__toggle md-toggle" data-md-toggle=
"__nav_3" type=
"checkbox" id=
"__nav_3" >
997 <label class=
"md-nav__link" for=
"__nav_3">
998 Languages, Templates & CSS
999 <span class=
"md-nav__icon md-icon"></span>
1001 <nav class=
"md-nav" aria-label=
"Languages, Templates & CSS" data-md-level=
"1">
1002 <label class=
"md-nav__title" for=
"__nav_3">
1003 <span class=
"md-nav__icon md-icon"></span>
1004 Languages, Templates & CSS
1006 <ul class=
"md-nav__list" data-md-scrollfix
>
1012 <li class=
"md-nav__item">
1013 <a href=
"../../../../view/languages/" class=
"md-nav__link">
1024 <li class=
"md-nav__item">
1025 <a href=
"../../../../view/templates/" class=
"md-nav__link">
1036 <li class=
"md-nav__item">
1037 <a href=
"../../../../view/css/" class=
"md-nav__link">
1058 <li class=
"md-nav__item md-nav__item--nested">
1061 <input class=
"md-nav__toggle md-toggle" data-md-toggle=
"__nav_4" type=
"checkbox" id=
"__nav_4" >
1063 <label class=
"md-nav__link" for=
"__nav_4">
1065 <span class=
"md-nav__icon md-icon"></span>
1067 <nav class=
"md-nav" aria-label=
"JavaScript API" data-md-level=
"1">
1068 <label class=
"md-nav__title" for=
"__nav_4">
1069 <span class=
"md-nav__icon md-icon"></span>
1072 <ul class=
"md-nav__list" data-md-scrollfix
>
1078 <li class=
"md-nav__item">
1079 <a href=
"../../../../javascript/general-usage/" class=
"md-nav__link">
1091 <li class=
"md-nav__item md-nav__item--nested">
1094 <input class=
"md-nav__toggle md-toggle" data-md-toggle=
"__nav_4_2" type=
"checkbox" id=
"__nav_4_2" >
1096 <label class=
"md-nav__link" for=
"__nav_4_2">
1098 <span class=
"md-nav__icon md-icon"></span>
1100 <nav class=
"md-nav" aria-label=
"New API" data-md-level=
"2">
1101 <label class=
"md-nav__title" for=
"__nav_4_2">
1102 <span class=
"md-nav__icon md-icon"></span>
1105 <ul class=
"md-nav__list" data-md-scrollfix
>
1111 <li class=
"md-nav__item">
1112 <a href=
"../../../../javascript/new-api_writing-a-module/" class=
"md-nav__link">
1123 <li class=
"md-nav__item">
1124 <a href=
"../../../../javascript/new-api_data-structures/" class=
"md-nav__link">
1135 <li class=
"md-nav__item">
1136 <a href=
"../../../../javascript/new-api_core/" class=
"md-nav__link">
1147 <li class=
"md-nav__item">
1148 <a href=
"../../../../javascript/new-api_dom/" class=
"md-nav__link">
1159 <li class=
"md-nav__item">
1160 <a href=
"../../../../javascript/new-api_events/" class=
"md-nav__link">
1171 <li class=
"md-nav__item">
1172 <a href=
"../../../../javascript/new-api_ajax/" class=
"md-nav__link">
1183 <li class=
"md-nav__item">
1184 <a href=
"../../../../javascript/new-api_dialogs/" class=
"md-nav__link">
1195 <li class=
"md-nav__item">
1196 <a href=
"../../../../javascript/new-api_browser/" class=
"md-nav__link">
1197 Browser and Screen Sizes
1207 <li class=
"md-nav__item">
1208 <a href=
"../../../../javascript/new-api_ui/" class=
"md-nav__link">
1225 <li class=
"md-nav__item">
1226 <a href=
"../../../../javascript/legacy-api/" class=
"md-nav__link">
1237 <li class=
"md-nav__item">
1238 <a href=
"../../../../javascript/helper-functions/" class=
"md-nav__link">
1249 <li class=
"md-nav__item">
1250 <a href=
"../../../../javascript/code-snippets/" class=
"md-nav__link">
1271 <li class=
"md-nav__item md-nav__item--nested">
1274 <input class=
"md-nav__toggle md-toggle" data-md-toggle=
"__nav_5" type=
"checkbox" id=
"__nav_5" >
1276 <label class=
"md-nav__link" for=
"__nav_5">
1278 <span class=
"md-nav__icon md-icon"></span>
1280 <nav class=
"md-nav" aria-label=
"Package Components" data-md-level=
"1">
1281 <label class=
"md-nav__title" for=
"__nav_5">
1282 <span class=
"md-nav__icon md-icon"></span>
1285 <ul class=
"md-nav__list" data-md-scrollfix
>
1291 <li class=
"md-nav__item">
1292 <a href=
"../../../../package/package-xml/" class=
"md-nav__link">
1304 <li class=
"md-nav__item md-nav__item--nested">
1307 <input class=
"md-nav__toggle md-toggle" data-md-toggle=
"__nav_5_2" type=
"checkbox" id=
"__nav_5_2" >
1309 <label class=
"md-nav__link" for=
"__nav_5_2">
1311 <span class=
"md-nav__icon md-icon"></span>
1313 <nav class=
"md-nav" aria-label=
"PIPs" data-md-level=
"2">
1314 <label class=
"md-nav__title" for=
"__nav_5_2">
1315 <span class=
"md-nav__icon md-icon"></span>
1318 <ul class=
"md-nav__list" data-md-scrollfix
>
1324 <li class=
"md-nav__item">
1325 <a href=
"../../../../package/pip/" class=
"md-nav__link">
1336 <li class=
"md-nav__item">
1337 <a href=
"../../../../package/pip/acl-option/" class=
"md-nav__link">
1348 <li class=
"md-nav__item">
1349 <a href=
"../../../../package/pip/acp-menu/" class=
"md-nav__link">
1360 <li class=
"md-nav__item">
1361 <a href=
"../../../../package/pip/acp-search-provider/" class=
"md-nav__link">
1372 <li class=
"md-nav__item">
1373 <a href=
"../../../../package/pip/acp-template/" class=
"md-nav__link">
1384 <li class=
"md-nav__item">
1385 <a href=
"../../../../package/pip/bbcode/" class=
"md-nav__link">
1396 <li class=
"md-nav__item">
1397 <a href=
"../../../../package/pip/box/" class=
"md-nav__link">
1408 <li class=
"md-nav__item">
1409 <a href=
"../../../../package/pip/clipboard-action/" class=
"md-nav__link">
1420 <li class=
"md-nav__item">
1421 <a href=
"../../../../package/pip/core-object/" class=
"md-nav__link">
1432 <li class=
"md-nav__item">
1433 <a href=
"../../../../package/pip/cronjob/" class=
"md-nav__link">
1444 <li class=
"md-nav__item">
1445 <a href=
"../../../../package/pip/event-listener/" class=
"md-nav__link">
1456 <li class=
"md-nav__item">
1457 <a href=
"../../../../package/pip/file/" class=
"md-nav__link">
1468 <li class=
"md-nav__item">
1469 <a href=
"../../../../package/pip/language/" class=
"md-nav__link">
1480 <li class=
"md-nav__item">
1481 <a href=
"../../../../package/pip/media-provider/" class=
"md-nav__link">
1492 <li class=
"md-nav__item">
1493 <a href=
"../../../../package/pip/menu/" class=
"md-nav__link">
1504 <li class=
"md-nav__item">
1505 <a href=
"../../../../package/pip/menu-item/" class=
"md-nav__link">
1516 <li class=
"md-nav__item">
1517 <a href=
"../../../../package/pip/object-type/" class=
"md-nav__link">
1528 <li class=
"md-nav__item">
1529 <a href=
"../../../../package/pip/object-type-definition/" class=
"md-nav__link">
1530 objectTypeDefinition
1540 <li class=
"md-nav__item">
1541 <a href=
"../../../../package/pip/option/" class=
"md-nav__link">
1552 <li class=
"md-nav__item">
1553 <a href=
"../../../../package/pip/page/" class=
"md-nav__link">
1564 <li class=
"md-nav__item">
1565 <a href=
"../../../../package/pip/pip/" class=
"md-nav__link">
1576 <li class=
"md-nav__item">
1577 <a href=
"../../../../package/pip/script/" class=
"md-nav__link">
1588 <li class=
"md-nav__item">
1589 <a href=
"../../../../package/pip/smiley/" class=
"md-nav__link">
1600 <li class=
"md-nav__item">
1601 <a href=
"../../../../package/pip/sql/" class=
"md-nav__link">
1612 <li class=
"md-nav__item">
1613 <a href=
"../../../../package/pip/style/" class=
"md-nav__link">
1624 <li class=
"md-nav__item">
1625 <a href=
"../../../../package/pip/template/" class=
"md-nav__link">
1636 <li class=
"md-nav__item">
1637 <a href=
"../../../../package/pip/template-listener/" class=
"md-nav__link">
1648 <li class=
"md-nav__item">
1649 <a href=
"../../../../package/pip/user-group-option/" class=
"md-nav__link">
1660 <li class=
"md-nav__item">
1661 <a href=
"../../../../package/pip/user-menu/" class=
"md-nav__link">
1672 <li class=
"md-nav__item">
1673 <a href=
"../../../../package/pip/user-notification-event/" class=
"md-nav__link">
1674 userNotificationEvent
1684 <li class=
"md-nav__item">
1685 <a href=
"../../../../package/pip/user-option/" class=
"md-nav__link">
1696 <li class=
"md-nav__item">
1697 <a href=
"../../../../package/pip/user-profile-menu/" class=
"md-nav__link">
1714 <li class=
"md-nav__item">
1715 <a href=
"../../../../package/database-php-api/" class=
"md-nav__link">
1736 <li class=
"md-nav__item md-nav__item--nested">
1739 <input class=
"md-nav__toggle md-toggle" data-md-toggle=
"__nav_6" type=
"checkbox" id=
"__nav_6" >
1741 <label class=
"md-nav__link" for=
"__nav_6">
1743 <span class=
"md-nav__icon md-icon"></span>
1745 <nav class=
"md-nav" aria-label=
"Migration" data-md-level=
"1">
1746 <label class=
"md-nav__title" for=
"__nav_6">
1747 <span class=
"md-nav__icon md-icon"></span>
1750 <ul class=
"md-nav__list" data-md-scrollfix
>
1757 <li class=
"md-nav__item md-nav__item--nested">
1760 <input class=
"md-nav__toggle md-toggle" data-md-toggle=
"__nav_6_1" type=
"checkbox" id=
"__nav_6_1" >
1762 <label class=
"md-nav__link" for=
"__nav_6_1">
1763 Migrating from WSC
5.3
1764 <span class=
"md-nav__icon md-icon"></span>
1766 <nav class=
"md-nav" aria-label=
"Migrating from WSC 5.3" data-md-level=
"2">
1767 <label class=
"md-nav__title" for=
"__nav_6_1">
1768 <span class=
"md-nav__icon md-icon"></span>
1769 Migrating from WSC
5.3
1771 <ul class=
"md-nav__list" data-md-scrollfix
>
1777 <li class=
"md-nav__item">
1778 <a href=
"../../../../migration/wsc53/php/" class=
"md-nav__link">
1789 <li class=
"md-nav__item">
1790 <a href=
"../../../../migration/wsc53/session/" class=
"md-nav__link">
1791 Session Handling and Authentication
1801 <li class=
"md-nav__item">
1802 <a href=
"../../../../migration/wsc53/javascript/" class=
"md-nav__link">
1813 <li class=
"md-nav__item">
1814 <a href=
"../../../../migration/wsc53/templates/" class=
"md-nav__link">
1825 <li class=
"md-nav__item">
1826 <a href=
"../../../../migration/wsc53/libraries/" class=
"md-nav__link">
1827 Third Party Libraries
1844 <li class=
"md-nav__item md-nav__item--nested">
1847 <input class=
"md-nav__toggle md-toggle" data-md-toggle=
"__nav_6_2" type=
"checkbox" id=
"__nav_6_2" >
1849 <label class=
"md-nav__link" for=
"__nav_6_2">
1850 Migrating from WSC
5.2
1851 <span class=
"md-nav__icon md-icon"></span>
1853 <nav class=
"md-nav" aria-label=
"Migrating from WSC 5.2" data-md-level=
"2">
1854 <label class=
"md-nav__title" for=
"__nav_6_2">
1855 <span class=
"md-nav__icon md-icon"></span>
1856 Migrating from WSC
5.2
1858 <ul class=
"md-nav__list" data-md-scrollfix
>
1864 <li class=
"md-nav__item">
1865 <a href=
"../../../../migration/wsc52/php/" class=
"md-nav__link">
1876 <li class=
"md-nav__item">
1877 <a href=
"../../../../migration/wsc52/templates/" class=
"md-nav__link">
1878 Templates and Languages
1888 <li class=
"md-nav__item">
1889 <a href=
"../../../../migration/wsc52/libraries/" class=
"md-nav__link">
1890 Third Party Libraries
1907 <li class=
"md-nav__item md-nav__item--nested">
1910 <input class=
"md-nav__toggle md-toggle" data-md-toggle=
"__nav_6_3" type=
"checkbox" id=
"__nav_6_3" >
1912 <label class=
"md-nav__link" for=
"__nav_6_3">
1913 Migrating from WSC
3.1
1914 <span class=
"md-nav__icon md-icon"></span>
1916 <nav class=
"md-nav" aria-label=
"Migrating from WSC 3.1" data-md-level=
"2">
1917 <label class=
"md-nav__title" for=
"__nav_6_3">
1918 <span class=
"md-nav__icon md-icon"></span>
1919 Migrating from WSC
3.1
1921 <ul class=
"md-nav__list" data-md-scrollfix
>
1927 <li class=
"md-nav__item">
1928 <a href=
"../../../../migration/wsc31/php/" class=
"md-nav__link">
1946 <li class=
"md-nav__item md-nav__item--nested">
1949 <input class=
"md-nav__toggle md-toggle" data-md-toggle=
"__nav_6_4" type=
"checkbox" id=
"__nav_6_4" >
1951 <label class=
"md-nav__link" for=
"__nav_6_4">
1952 Migrating from WSC
3.0
1953 <span class=
"md-nav__icon md-icon"></span>
1955 <nav class=
"md-nav" aria-label=
"Migrating from WSC 3.0" data-md-level=
"2">
1956 <label class=
"md-nav__title" for=
"__nav_6_4">
1957 <span class=
"md-nav__icon md-icon"></span>
1958 Migrating from WSC
3.0
1960 <ul class=
"md-nav__list" data-md-scrollfix
>
1966 <li class=
"md-nav__item">
1967 <a href=
"../../../../migration/wsc30/php/" class=
"md-nav__link">
1978 <li class=
"md-nav__item">
1979 <a href=
"../../../../migration/wsc30/javascript/" class=
"md-nav__link">
1990 <li class=
"md-nav__item">
1991 <a href=
"../../../../migration/wsc30/templates/" class=
"md-nav__link">
2002 <li class=
"md-nav__item">
2003 <a href=
"../../../../migration/wsc30/css/" class=
"md-nav__link">
2014 <li class=
"md-nav__item">
2015 <a href=
"../../../../migration/wsc30/package/" class=
"md-nav__link">
2033 <li class=
"md-nav__item md-nav__item--nested">
2036 <input class=
"md-nav__toggle md-toggle" data-md-toggle=
"__nav_6_5" type=
"checkbox" id=
"__nav_6_5" >
2038 <label class=
"md-nav__link" for=
"__nav_6_5">
2039 Migrating from WCF
2.1
2040 <span class=
"md-nav__icon md-icon"></span>
2042 <nav class=
"md-nav" aria-label=
"Migrating from WCF 2.1" data-md-level=
"2">
2043 <label class=
"md-nav__title" for=
"__nav_6_5">
2044 <span class=
"md-nav__icon md-icon"></span>
2045 Migrating from WCF
2.1
2047 <ul class=
"md-nav__list" data-md-scrollfix
>
2053 <li class=
"md-nav__item">
2054 <a href=
"../../../../migration/wcf21/php/" class=
"md-nav__link">
2065 <li class=
"md-nav__item">
2066 <a href=
"../../../../migration/wcf21/templates/" class=
"md-nav__link">
2077 <li class=
"md-nav__item">
2078 <a href=
"../../../../migration/wcf21/css/" class=
"md-nav__link">
2089 <li class=
"md-nav__item">
2090 <a href=
"../../../../migration/wcf21/package/" class=
"md-nav__link">
2117 <li class=
"md-nav__item md-nav__item--nested">
2120 <input class=
"md-nav__toggle md-toggle" data-md-toggle=
"__nav_7" type=
"checkbox" id=
"__nav_7" >
2122 <label class=
"md-nav__link" for=
"__nav_7">
2124 <span class=
"md-nav__icon md-icon"></span>
2126 <nav class=
"md-nav" aria-label=
"Tutorials" data-md-level=
"1">
2127 <label class=
"md-nav__title" for=
"__nav_7">
2128 <span class=
"md-nav__icon md-icon"></span>
2131 <ul class=
"md-nav__list" data-md-scrollfix
>
2138 <li class=
"md-nav__item md-nav__item--nested">
2141 <input class=
"md-nav__toggle md-toggle" data-md-toggle=
"__nav_7_1" type=
"checkbox" id=
"__nav_7_1" >
2143 <label class=
"md-nav__link" for=
"__nav_7_1">
2145 <span class=
"md-nav__icon md-icon"></span>
2147 <nav class=
"md-nav" aria-label=
"Tutorial Series" data-md-level=
"2">
2148 <label class=
"md-nav__title" for=
"__nav_7_1">
2149 <span class=
"md-nav__icon md-icon"></span>
2152 <ul class=
"md-nav__list" data-md-scrollfix
>
2158 <li class=
"md-nav__item">
2159 <a href=
"../../../../tutorial/series/overview/" class=
"md-nav__link">
2170 <li class=
"md-nav__item">
2171 <a href=
"../../../../tutorial/series/part_1/" class=
"md-nav__link">
2182 <li class=
"md-nav__item">
2183 <a href=
"../../../../tutorial/series/part_2/" class=
"md-nav__link">
2194 <li class=
"md-nav__item">
2195 <a href=
"../../../../tutorial/series/part_3/" class=
"md-nav__link">
2222 <div class=
"md-sidebar md-sidebar--secondary" data-md-component=
"sidebar" data-md-type=
"toc" >
2223 <div class=
"md-sidebar__scrollwrap">
2224 <div class=
"md-sidebar__inner">
2226 <nav class=
"md-nav md-nav--secondary" aria-label=
"Table of contents">
2232 <label class=
"md-nav__title" for=
"__toc">
2233 <span class=
"md-nav__icon md-icon"></span>
2236 <ul class=
"md-nav__list" data-md-component=
"toc" data-md-scrollfix
>
2238 <li class=
"md-nav__item">
2239 <a href=
"#abstract-form-fields" class=
"md-nav__link">
2240 Abstract Form Fields
2243 <nav class=
"md-nav" aria-label=
"Abstract Form Fields">
2244 <ul class=
"md-nav__list">
2246 <li class=
"md-nav__item">
2247 <a href=
"#abstractformfield" class=
"md-nav__link">
2253 <li class=
"md-nav__item">
2254 <a href=
"#abstractnumericformfield" class=
"md-nav__link">
2255 AbstractNumericFormField
2265 <li class=
"md-nav__item">
2266 <a href=
"#general-form-fields" class=
"md-nav__link">
2270 <nav class=
"md-nav" aria-label=
"General Form Fields">
2271 <ul class=
"md-nav__list">
2273 <li class=
"md-nav__item">
2274 <a href=
"#booleanformfield" class=
"md-nav__link">
2280 <li class=
"md-nav__item">
2281 <a href=
"#checkboxformfield" class=
"md-nav__link">
2287 <li class=
"md-nav__item">
2288 <a href=
"#classnameformfield" class=
"md-nav__link">
2294 <li class=
"md-nav__item">
2295 <a href=
"#dateformfield" class=
"md-nav__link">
2301 <li class=
"md-nav__item">
2302 <a href=
"#descriptionformfield" class=
"md-nav__link">
2303 DescriptionFormField
2308 <li class=
"md-nav__item">
2309 <a href=
"#emailformfield" class=
"md-nav__link">
2315 <li class=
"md-nav__item">
2316 <a href=
"#floatformfield" class=
"md-nav__link">
2322 <li class=
"md-nav__item">
2323 <a href=
"#iconformfield" class=
"md-nav__link">
2329 <li class=
"md-nav__item">
2330 <a href=
"#integerformfield" class=
"md-nav__link">
2336 <li class=
"md-nav__item">
2337 <a href=
"#isdisabledformfield" class=
"md-nav__link">
2343 <li class=
"md-nav__item">
2344 <a href=
"#itemlistformfield" class=
"md-nav__link">
2350 <li class=
"md-nav__item">
2351 <a href=
"#multilinetextformfield" class=
"md-nav__link">
2352 MultilineTextFormField
2357 <li class=
"md-nav__item">
2358 <a href=
"#multipleselectionformfield" class=
"md-nav__link">
2359 MultipleSelectionFormField
2364 <li class=
"md-nav__item">
2365 <a href=
"#radiobuttonformfield" class=
"md-nav__link">
2366 RadioButtonFormField
2371 <li class=
"md-nav__item">
2372 <a href=
"#ratingformfield" class=
"md-nav__link">
2378 <li class=
"md-nav__item">
2379 <a href=
"#showorderformfield" class=
"md-nav__link">
2385 <li class=
"md-nav__item">
2386 <a href=
"#singleselectionformfield" class=
"md-nav__link">
2387 SingleSelectionFormField
2392 <li class=
"md-nav__item">
2393 <a href=
"#sortorderformfield" class=
"md-nav__link">
2399 <li class=
"md-nav__item">
2400 <a href=
"#textformfield" class=
"md-nav__link">
2406 <li class=
"md-nav__item">
2407 <a href=
"#titleformfield" class=
"md-nav__link">
2413 <li class=
"md-nav__item">
2414 <a href=
"#urlformfield" class=
"md-nav__link">
2425 <li class=
"md-nav__item">
2426 <a href=
"#specific-fields" class=
"md-nav__link">
2430 <nav class=
"md-nav" aria-label=
"Specific Fields">
2431 <ul class=
"md-nav__list">
2433 <li class=
"md-nav__item">
2434 <a href=
"#aclformfield" class=
"md-nav__link">
2440 <li class=
"md-nav__item">
2441 <a href=
"#buttonformfield" class=
"md-nav__link">
2447 <li class=
"md-nav__item">
2448 <a href=
"#captchaformfield" class=
"md-nav__link">
2454 <li class=
"md-nav__item">
2455 <a href=
"#contentlanguageformfield" class=
"md-nav__link">
2456 ContentLanguageFormField
2461 <li class=
"md-nav__item">
2462 <a href=
"#labelformfield" class=
"md-nav__link">
2468 <li class=
"md-nav__item">
2469 <a href=
"#optionformfield" class=
"md-nav__link">
2475 <li class=
"md-nav__item">
2476 <a href=
"#simpleaclformfield" class=
"md-nav__link">
2482 <li class=
"md-nav__item">
2483 <a href=
"#singlemediaselectionformfield" class=
"md-nav__link">
2484 SingleMediaSelectionFormField
2489 <li class=
"md-nav__item">
2490 <a href=
"#tagformfield" class=
"md-nav__link">
2496 <li class=
"md-nav__item">
2497 <a href=
"#uploadformfield" class=
"md-nav__link">
2501 <nav class=
"md-nav" aria-label=
"UploadFormField">
2502 <ul class=
"md-nav__list">
2504 <li class=
"md-nav__item">
2505 <a href=
"#provide-value-from-database-object" class=
"md-nav__link">
2506 Provide value from database object
2511 <li class=
"md-nav__item">
2512 <a href=
"#process-files" class=
"md-nav__link">
2523 <li class=
"md-nav__item">
2524 <a href=
"#userformfield" class=
"md-nav__link">
2530 <li class=
"md-nav__item">
2531 <a href=
"#userpasswordfield" class=
"md-nav__link">
2537 <li class=
"md-nav__item">
2538 <a href=
"#usergroupoptionformfield" class=
"md-nav__link">
2539 UserGroupOptionFormField
2544 <li class=
"md-nav__item">
2545 <a href=
"#usernameformfield" class=
"md-nav__link">
2556 <li class=
"md-nav__item">
2557 <a href=
"#wysiwyg-form-container" class=
"md-nav__link">
2558 Wysiwyg form container
2561 <nav class=
"md-nav" aria-label=
"Wysiwyg form container">
2562 <ul class=
"md-nav__list">
2564 <li class=
"md-nav__item">
2565 <a href=
"#wysiwygattachmentformfield" class=
"md-nav__link">
2566 WysiwygAttachmentFormField
2571 <li class=
"md-nav__item">
2572 <a href=
"#wysiwygpollformcontainer" class=
"md-nav__link">
2573 WysiwygPollFormContainer
2578 <li class=
"md-nav__item">
2579 <a href=
"#wysiwygsmileyformcontainer" class=
"md-nav__link">
2580 WysiwygSmileyFormContainer
2583 <nav class=
"md-nav" aria-label=
"WysiwygSmileyFormContainer">
2584 <ul class=
"md-nav__list">
2586 <li class=
"md-nav__item">
2587 <a href=
"#wysiwygsmileyformnode" class=
"md-nav__link">
2588 WysiwygSmileyFormNode
2598 <li class=
"md-nav__item">
2599 <a href=
"#example" class=
"md-nav__link">
2605 <li class=
"md-nav__item">
2606 <a href=
"#wysiwygformfield" class=
"md-nav__link">
2612 <li class=
"md-nav__item">
2613 <a href=
"#twysiwygformnode" class=
"md-nav__link">
2624 <li class=
"md-nav__item">
2625 <a href=
"#single-use-form-fields" class=
"md-nav__link">
2626 Single-Use Form Fields
2629 <nav class=
"md-nav" aria-label=
"Single-Use Form Fields">
2630 <ul class=
"md-nav__list">
2632 <li class=
"md-nav__item">
2633 <a href=
"#bbcodeattributesformfield" class=
"md-nav__link">
2634 BBCodeAttributesFormField
2639 <li class=
"md-nav__item">
2640 <a href=
"#devtoolsprojectexcludedpackagesformfield" class=
"md-nav__link">
2641 DevtoolsProjectExcludedPackagesFormField
2646 <li class=
"md-nav__item">
2647 <a href=
"#devtoolsprojectinstructionsformfield" class=
"md-nav__link">
2648 DevtoolsProjectInstructionsFormField
2653 <li class=
"md-nav__item">
2654 <a href=
"#devtoolsprojectoptionalpackagesformfield" class=
"md-nav__link">
2655 DevtoolsProjectOptionalPackagesFormField
2660 <li class=
"md-nav__item">
2661 <a href=
"#devtoolsprojectrequiredpackagesformfield" class=
"md-nav__link">
2662 DevtoolsProjectRequiredPackagesFormField
2680 <div class=
"md-content" data-md-component=
"content">
2681 <article class=
"md-content__inner md-typeset">
2685 <h1 id=
"form-builder-fields">Form Builder Fields
<a class=
"headerlink" href=
"#form-builder-fields" title=
"Permanent link">#
</a></h1>
2686 <h2 id=
"abstract-form-fields">Abstract Form Fields
<a class=
"headerlink" href=
"#abstract-form-fields" title=
"Permanent link">#
</a></h2>
2687 <p>The following form field classes cannot be instantiated directly because they are abstract, but they can/must be used when creating own form field classes.
</p>
2688 <h3 id=
"abstractformfield"><code>AbstractFormField
</code><a class=
"headerlink" href=
"#abstractformfield" title=
"Permanent link">#
</a></h3>
2689 <p><code>AbstractFormField
</code> is the abstract default implementation of the
<code>IFormField
</code> interface and it is expected that every implementation of
<code>IFormField
</code> implements the interface by extending this class.
</p>
2690 <h3 id=
"abstractnumericformfield"><code>AbstractNumericFormField
</code><a class=
"headerlink" href=
"#abstractnumericformfield" title=
"Permanent link">#
</a></h3>
2691 <p><code>AbstractNumericFormField
</code> is the abstract implementation of a form field handling a single numeric value.
2692 The class implements
<code>IAttributeFormField
</code>,
<code>IAutoCompleteFormField
</code>,
<code>ICssClassFormField
</code>,
<code>IImmutableFormField
</code>,
<code>IInputModeFormField
</code>,
<code>IMaximumFormField
</code>,
<code>IMinimumFormField
</code>,
<code>INullableFormField
</code>,
<code>IPlaceholderFormField
</code> and
<code>ISuffixedFormField
</code>.
2693 If the property
<code>$integerValues
</code> is
<code>true
</code>, the form field works with integer values, otherwise it works with floating point numbers.
2694 The methods
<code>step($step = null)
</code> and
<code>getStep()
</code> can be used to set and get the step attribute of the
<code>input
</code> element.
2695 The default step for form fields with integer values is
<code>1</code>.
2696 Otherwise, the default step is
<code>any
</code>.
</p>
2697 <h2 id=
"general-form-fields">General Form Fields
<a class=
"headerlink" href=
"#general-form-fields" title=
"Permanent link">#
</a></h2>
2698 <p>The following form fields are general reusable fields without any underlying context.
</p>
2699 <h3 id=
"booleanformfield"><code>BooleanFormField
</code><a class=
"headerlink" href=
"#booleanformfield" title=
"Permanent link">#
</a></h3>
2700 <p><code>BooleanFormField
</code> is used for boolean (
<code>0</code> or
<code>1</code>,
<code>yes
</code> or
<code>no
</code>) values.
2701 Objects of this class require a label.
2702 The return value of
<code>getSaveValue()
</code> is the integer representation of the boolean value, i.e.
<code>0</code> or
<code>1</code>.
2703 The class implements
<code>IAttributeFormField
</code>,
<code>IAutoFocusFormField
</code>,
<code>ICssClassFormField
</code>, and
<code>IImmutableFormField
</code>.
</p>
2704 <h3 id=
"checkboxformfield"><code>CheckboxFormField
</code><a class=
"headerlink" href=
"#checkboxformfield" title=
"Permanent link">#
</a></h3>
2705 <div class=
"admonition info">
2706 <p class=
"admonition-title">Only available since version
5.3.2.
</p>
2708 <p><code>CheckboxFormField
</code> extends
<code>BooleanFormField
</code> and offers a simple HTML checkbox.
</p>
2709 <h3 id=
"classnameformfield"><code>ClassNameFormField
</code><a class=
"headerlink" href=
"#classnameformfield" title=
"Permanent link">#
</a></h3>
2710 <p><code>ClassNameFormField
</code> is a
<a href=
"#textformfield">text form field
</a> that supports additional settings, specific to entering a PHP class name:
</p>
2712 <li><code>classExists($classExists = true)
</code> and
<code>getClassExists()
</code> can be used to ensure that the entered class currently exists in the installation.
2713 By default, the existance of the entered class is required.
</li>
2714 <li><code>implementedInterface($interface)
</code> and
<code>getImplementedInterface()
</code> can be used to ensure that the entered class implements the specified interface.
2715 By default, no interface is required.
</li>
2716 <li><code>parentClass($parentClass)
</code> and
<code>getParentClass()
</code> can be used to ensure that the entered class extends the specified class.
2717 By default, no parent class is required.
</li>
2718 <li><code>instantiable($instantiable = true)
</code> and
<code>isInstantiable()
</code> can be used to ensure that the entered class is instantiable.
2719 By default, entered classes have to instantiable.
</li>
2721 <p>Additionally, the default id of a
<code>ClassNameFormField
</code> object is
<code>className
</code>, the default label is
<code>wcf.form.field.className
</code>, and if either an interface or a parent class is required, a default description is set if no description has already been set (
<code>wcf.form.field.className.description.interface
</code> and
<code>wcf.form.field.className.description.parentClass
</code>, respectively).
</p>
2722 <h3 id=
"dateformfield"><code>DateFormField
</code><a class=
"headerlink" href=
"#dateformfield" title=
"Permanent link">#
</a></h3>
2723 <p><code>DateFormField
</code> is a form field to enter a date (and optionally a time).
2724 The class implements
<code>IAttributeFormField
</code>,
<code>IAutoFocusFormField
</code>,
<code>ICssClassFormField
</code>,
<code>IImmutableFormField
</code>, and
<code>INullableFormField
</code>.
2725 The following methods are specific to this form field class:
</p>
2727 <li><code>earliestDate($earliestDate)
</code> and
<code>getEarliestDate()
</code> can be used to get and set the earliest selectable/valid date and
<code>latestDate($latestDate)
</code> and
<code>getLatestDate()
</code> can be used to get and set the latest selectable/valid date.
2728 The date passed to the setters must have the same format as set via
<code>saveValueFormat()
</code>.
2729 If a custom format is used, that format has to be set via
<code>saveValueFormat()
</code> before calling any of the setters.
</li>
2730 <li><code>saveValueFormat($saveValueFormat)
</code> and
<code>getSaveValueFormat()
</code> can be used to specify the date format of the value returned by
<code>getSaveValue()
</code>.
2731 By default,
<code>U
</code> is used as format.
2732 The
<a href=
"https://secure.php.net/manual/en/function.date.php">PHP manual
</a> provides an overview of supported formats.
</li>
2733 <li><code>supportTime($supportsTime = true)
</code> and
<code>supportsTime()
</code> can be used to toggle whether, in addition to a date, a time can also be specified.
2734 By default, specifying a time is disabled.
</li>
2736 <h3 id=
"descriptionformfield"><code>DescriptionFormField
</code><a class=
"headerlink" href=
"#descriptionformfield" title=
"Permanent link">#
</a></h3>
2737 <p><code>DescriptionFormField
</code> is a
<a href=
"#multilinetextformfield">multi-line text form field
</a> with
<code>description
</code> as the default id and
<code>wcf.global.description
</code> as the default label.
</p>
2738 <h3 id=
"emailformfield"><code>EmailFormField
</code><a class=
"headerlink" href=
"#emailformfield" title=
"Permanent link">#
</a></h3>
2739 <p><code>EmailFormField
</code> is a form field to enter an email address which is internally validated using
<code>UserUtil::isValidEmail()
</code>.
2740 The class implements
<code>IAttributeFormField
</code>,
<code>IAutoCompleteFormField
</code>,
<code>IAutoFocusFormField
</code>,
<code>ICssClassFormField
</code>,
<code>II18nFormField
</code>,
<code>IImmutableFormField
</code>,
<code>IInputModeFormField
</code>,
<code>IPatternFormField
</code>, and
<code>IPlaceholderFormField
</code>.
</p>
2741 <h3 id=
"floatformfield"><code>FloatFormField
</code><a class=
"headerlink" href=
"#floatformfield" title=
"Permanent link">#
</a></h3>
2742 <p><code>FloatFormField
</code> is an implementation of
<a href=
"#abstractnumericformfield">AbstractNumericFormField
</a> for floating point numbers.
</p>
2743 <h3 id=
"iconformfield"><code>IconFormField
</code><a class=
"headerlink" href=
"#iconformfield" title=
"Permanent link">#
</a></h3>
2744 <p><code>IconFormField
</code> is a form field to select a FontAwesome icon.
</p>
2745 <h3 id=
"integerformfield"><code>IntegerFormField
</code><a class=
"headerlink" href=
"#integerformfield" title=
"Permanent link">#
</a></h3>
2746 <p><code>IntegerFormField
</code> is an implementation of
<a href=
"#abstractnumericformfield">AbstractNumericFormField
</a> for integers.
</p>
2747 <h3 id=
"isdisabledformfield"><code>IsDisabledFormField
</code><a class=
"headerlink" href=
"#isdisabledformfield" title=
"Permanent link">#
</a></h3>
2748 <p><code>IsDisabledFormField
</code> is a
<a href=
"#booleanformfield">boolean form field
</a> with
<code>isDisabled
</code> as the default id.
</p>
2749 <h3 id=
"itemlistformfield"><code>ItemListFormField
</code><a class=
"headerlink" href=
"#itemlistformfield" title=
"Permanent link">#
</a></h3>
2750 <p><code>ItemListFormField
</code> is a form field in which multiple values can be entered and returned in different formats as save value.
2751 The class implements
<code>IAttributeFormField
</code>,
<code>IAutoFocusFormField
</code>,
<code>ICssClassFormField
</code>,
<code>IImmutableFormField
</code>, and
<code>IMultipleFormField
</code>.
2752 The
<code>saveValueType($saveValueType)
</code> and
<code>getSaveValueType()
</code> methods are specific to this form field class and determine the format of the save value.
2753 The following save value types are supported:
</p>
2755 <li><code>ItemListFormField::SAVE_VALUE_TYPE_ARRAY
</code> adds a custom data processor that writes the form field data directly in the parameters array and not in the data sub-array of the parameters array.
</li>
2756 <li><code>ItemListFormField::SAVE_VALUE_TYPE_CSV
</code> lets the value be returned as a string in which the values are concatenated by commas.
</li>
2757 <li><code>ItemListFormField::SAVE_VALUE_TYPE_NSV
</code> lets the value be returned as a string in which the values are concatenated by
<code>\n
</code>.
</li>
2758 <li><code>ItemListFormField::SAVE_VALUE_TYPE_SSV
</code> lets the value be returned as a string in which the values are concatenated by spaces.
</li>
2760 <p>By default,
<code>ItemListFormField::SAVE_VALUE_TYPE_CSV
</code> is used.
</p>
2761 <p>If
<code>ItemListFormField::SAVE_VALUE_TYPE_ARRAY
</code> is used as save value type,
<code>ItemListFormField
</code> objects register a
<a href=
"../validation_data/#customformfielddataprocessor">custom form field data processor
</a> to add the relevant array into the
<code>$parameters
</code> array directly using the object property as the array key.
</p>
2762 <h3 id=
"multilinetextformfield"><code>MultilineTextFormField
</code><a class=
"headerlink" href=
"#multilinetextformfield" title=
"Permanent link">#
</a></h3>
2763 <p><code>MultilineTextFormField
</code> is a
<a href=
"#textformfield">text form field
</a> that supports multiple rows of text.
2764 The methods
<code>rows($rows)
</code> and
<code>getRows()
</code> can be used to set and get the number of rows of the
<code>textarea
</code> elements.
2765 The default number of rows is
<code>10</code>.
2766 These methods do
<strong>not
</strong>, however, restrict the number of text rows that canbe entered.
</p>
2767 <h3 id=
"multipleselectionformfield"><code>MultipleSelectionFormField
</code><a class=
"headerlink" href=
"#multipleselectionformfield" title=
"Permanent link">#
</a></h3>
2768 <p><code>MultipleSelectionFormField
</code> is a form fields that allows the selection of multiple options out of a predefined list of available options.
2769 The class implements
<code>IAttributeFormField
</code>,
<code>ICssClassFormField
</code>,
<code>IFilterableSelectionFormField
</code>,
<code>IImmutableFormField
</code>, and
<code>INullableFormField
</code>.
2770 If the field is nullable and no option is selected,
<code>null
</code> is returned as the save value.
</p>
2771 <h3 id=
"radiobuttonformfield"><code>RadioButtonFormField
</code><a class=
"headerlink" href=
"#radiobuttonformfield" title=
"Permanent link">#
</a></h3>
2772 <p><code>RadioButtonFormField
</code> is a form fields that allows the selection of a single option out of a predefined list of available options using radiobuttons.
2773 The class implements
<code>IAttributeFormField
</code>,
<code>ICssClassFormField
</code>,
<code>IImmutableFormField
</code>, and
<code>ISelectionFormField
</code>.
</p>
2774 <h3 id=
"ratingformfield"><code>RatingFormField
</code><a class=
"headerlink" href=
"#ratingformfield" title=
"Permanent link">#
</a></h3>
2775 <p><code>RatingFormField
</code> is a form field to set a rating for an object.
2776 The class implements
<code>IImmutableFormField
</code>,
<code>IMaximumFormField
</code>,
<code>IMinimumFormField
</code>, and
<code>INullableFormField
</code>.
2777 Form fields of this class have
<code>rating
</code> as their default id,
<code>wcf.form.field.rating
</code> as their default label,
<code>1</code> as their default minimum, and
<code>5</code> as their default maximum.
2778 For this field, the minimum and maximum refer to the minimum and maximum rating an object can get.
2779 When the field is shown, there will be
<code>maximum() - minimum() +
1</code> icons be shown with additional CSS classes that can be set and gotten via
<code>defaultCssClasses(array $cssClasses)
</code> and
<code>getDefaultCssClasses()
</code>.
2780 If a rating values is set, the first
<code>getValue()
</code> icons will instead use the classes that can be set and gotten via
<code>activeCssClasses(array $cssClasses)
</code> and
<code>getActiveCssClasses()
</code>.
2781 By default, the only default class is
<code>fa-star-o
</code> and the active classes are
<code>fa-star
</code> and
<code>orange
</code>.
</p>
2782 <h3 id=
"showorderformfield"><code>ShowOrderFormField
</code><a class=
"headerlink" href=
"#showorderformfield" title=
"Permanent link">#
</a></h3>
2783 <p><code>ShowOrderFormField
</code> is a
<a href=
"#singleselectionformfield">single selection form field
</a> for which the selected value determines the position at which an object is shown.
2784 The show order field provides a list of all siblings and the object will be positioned
<strong>after
</strong> the selected sibling.
2785 To insert objects at the very beginning, the
<code>options()
</code> automatically method prepends an additional option for that case so that only the existing siblings need to be passed.
2786 The default id of instances of this class is
<code>showOrder
</code> and their default label is
<code>wcf.form.field.showOrder
</code>.
</p>
2787 <div class=
"admonition info">
2788 <p class=
"admonition-title">It is important that the relevant object property is always kept updated. Whenever a new object is added or an existing object is edited or delete, the values of the other objects have to be adjusted to ensure consecutive numbering.
</p>
2790 <h3 id=
"singleselectionformfield"><code>SingleSelectionFormField
</code><a class=
"headerlink" href=
"#singleselectionformfield" title=
"Permanent link">#
</a></h3>
2791 <p><code>SingleSelectionFormField
</code> is a form fields that allows the selection of a single option out of a predefined list of available options.
2792 The class implements
<code>ICssClassFormField
</code>,
<code>IFilterableSelectionFormField
</code>,
<code>IImmutableFormField
</code>, and
<code>INullableFormField
</code>.
2793 If the field is nullable and the current form field value is considered
<code>empty
</code> by PHP,
<code>null
</code> is returned as the save value.
</p>
2794 <h3 id=
"sortorderformfield"><code>SortOrderFormField
</code><a class=
"headerlink" href=
"#sortorderformfield" title=
"Permanent link">#
</a></h3>
2795 <p><code>SingleSelectionFormField
</code> is a
<a href=
"#singleselectionformfield">single selection form field
</a> with default id
<code>sortOrder
</code>, default label
<code>wcf.global.showOrder
</code> and default options
<code>ASC: wcf.global.sortOrder.ascending
</code> and
<code>DESC: wcf.global.sortOrder.descending
</code>.
</p>
2796 <h3 id=
"textformfield"><code>TextFormField
</code><a class=
"headerlink" href=
"#textformfield" title=
"Permanent link">#
</a></h3>
2797 <p><code>TextFormField
</code> is a form field that allows entering a single line of text.
2798 The class implements
<code>IAttributeFormField
</code>,
<code>IAutoCompleteFormField
</code>,
<code>ICssClassFormField
</code>,
<code>IImmutableFormField
</code>,
<code>II18nFormField
</code>,
<code>IInputModeFormField
</code>,
<code>IMaximumLengthFormField
</code>,
<code>IMinimumLengthFormField
</code>,
<code>IPatternFormField
</code>, and
<code>IPlaceholderFormField
</code>.
</p>
2799 <h3 id=
"titleformfield"><code>TitleFormField
</code><a class=
"headerlink" href=
"#titleformfield" title=
"Permanent link">#
</a></h3>
2800 <p><code>TitleFormField
</code> is a
<a href=
"#textformfield">text form field
</a> with
<code>title
</code> as the default id and
<code>wcf.global.title
</code> as the default label.
</p>
2801 <h3 id=
"urlformfield"><code>UrlFormField
</code><a class=
"headerlink" href=
"#urlformfield" title=
"Permanent link">#
</a></h3>
2802 <p><code>UrlFormField
</code> is a
<a href=
"#textformfield">text form field
</a> whose values are checked via
<code>Url::is()
</code>.
</p>
2803 <h2 id=
"specific-fields">Specific Fields
<a class=
"headerlink" href=
"#specific-fields" title=
"Permanent link">#
</a></h2>
2804 <p>The following form fields are reusable fields that generally are bound to a certain API or
<code>DatabaseObject
</code> implementation.
</p>
2805 <h3 id=
"aclformfield"><code>AclFormField
</code><a class=
"headerlink" href=
"#aclformfield" title=
"Permanent link">#
</a></h3>
2806 <p><code>AclFormField
</code> is used for setting up acl values for specific objects.
2807 The class implements
<code>IObjectTypeFormField
</code> and requires an object type of the object type definition
<code>com.woltlab.wcf.acl
</code>.
2808 Additionally, the class provides the methods
<code>categoryName($categoryName)
</code> and
<code>getCategoryName()
</code> that allow setting a specific name or filter for the acl option categories whose acl options are shown.
2809 A category name of
<code>null
</code> signals that no category filter is used.
</p>
2810 <p><code>AclFormField
</code> objects register a
<a href=
"../validation_data/#customformfielddataprocessor">custom form field data processor
</a> to add the relevant ACL object type id into the
<code>$parameters
</code> array directly using
<code>{$objectProperty}_aclObjectTypeID
</code> as the array key.
2811 The relevant database object action method is expected, based on the given ACL object type id, to save the ACL option values appropriately.
</p>
2812 <h3 id=
"buttonformfield"><code>ButtonFormField
</code><a class=
"headerlink" href=
"#buttonformfield" title=
"Permanent link">#
</a></h3>
2813 <div class=
"admonition info">
2814 <p class=
"admonition-title">Only available since version
5.4.
</p>
2816 <p><code>ButtonFormField
</code> shows a submit button as part of the form.
2817 The class implements
<code>IAttributeFormField
</code> and
<code>ICssClassFormField
</code>.
</p>
2818 <p>Specifically for this form field, there is the
<code>IsNotClickedFormFieldDependency
</code> dependency with which certain parts of the form will only be processed if the relevent button has not clicked.
</p>
2819 <h3 id=
"captchaformfield"><code>CaptchaFormField
</code><a class=
"headerlink" href=
"#captchaformfield" title=
"Permanent link">#
</a></h3>
2820 <p><code>CaptchaFormField
</code> is used to add captcha protection to the form.
</p>
2821 <p>You must specify a captcha object type (
<code>com.woltlab.wcf.captcha
</code>) using the
<code>objectType()
</code> method.
</p>
2822 <h3 id=
"contentlanguageformfield"><code>ContentLanguageFormField
</code><a class=
"headerlink" href=
"#contentlanguageformfield" title=
"Permanent link">#
</a></h3>
2823 <p><code>ContentLanguageFormField
</code> is used to select the content language of an object.
2824 Fields of this class are only available if multilingualism is enabled and if there are content languages.
2825 The class implements
<code>IImmutableFormField
</code>.
</p>
2826 <h3 id=
"labelformfield"><code>LabelFormField
</code><a class=
"headerlink" href=
"#labelformfield" title=
"Permanent link">#
</a></h3>
2827 <p><code>LabelFormField
</code> is used to select a label from a specific label group.
2828 The class implements
<code>IObjectTypeFormNode
</code>.
</p>
2829 <p>The
<code>labelGroup(ViewableLabelGroup $labelGroup)
</code> and
<code>getLabelGroup()
</code> methods are specific to this form field class and can be used to set and get the label group whose labels can be selected.
2830 Additionally, there is the static method
<code>createFields($objectType, array $labelGroups, $objectProperty = 'labelIDs)
</code> that can be used to create all relevant label form fields for a given list of label groups.
2831 In most cases,
<code>LabelFormField::createFields()
</code> should be used.
</p>
2832 <h3 id=
"optionformfield"><code>OptionFormField
</code><a class=
"headerlink" href=
"#optionformfield" title=
"Permanent link">#
</a></h3>
2833 <p><code>OptionFormField
</code> is an
<a href=
"#itemlistformfield">item list form field
</a> to set a list of options.
2834 The class implements
<code>IPackagesFormField
</code> and only options of the set packages are considered available.
2835 The default label of instances of this class is
<code>wcf.form.field.option
</code> and their default id is
<code>options
</code>.
</p>
2836 <h3 id=
"simpleaclformfield"><code>SimpleAclFormField
</code><a class=
"headerlink" href=
"#simpleaclformfield" title=
"Permanent link">#
</a></h3>
2837 <p><code>SimpleAclFormField
</code> is used for setting up simple acl values (one
<code>yes
</code>/
<code>no
</code> option per user and user group) for specific objects.
</p>
2838 <p><code>SimpleAclFormField
</code> objects register a
<a href=
"../validation_data/#customformfielddataprocessor">custom form field data processor
</a> to add the relevant simple ACL data array into the
<code>$parameters
</code> array directly using the object property as the array key.
</p>
2839 <h3 id=
"singlemediaselectionformfield"><code>SingleMediaSelectionFormField
</code><a class=
"headerlink" href=
"#singlemediaselectionformfield" title=
"Permanent link">#
</a></h3>
2840 <p><code>SingleMediaSelectionFormField
</code> is used to select a specific media file.
2841 The class implements
<code>IImmutableFormField
</code>.
</p>
2842 <p>The following methods are specific to this form field class:
</p>
2844 <li><code>imageOnly($imageOnly = true)
</code> and
<code>isImageOnly()
</code> can be used to set and check if only images may be selected.
</li>
2845 <li><code>getMedia()
</code> returns the media file based on the current field value if a field is set.
</li>
2847 <h3 id=
"tagformfield"><code>TagFormField
</code><a class=
"headerlink" href=
"#tagformfield" title=
"Permanent link">#
</a></h3>
2848 <p><code>TagFormField
</code> is a form field to enter tags.
2849 The class implements
<code>IAttributeFormField
</code> and
<code>IObjectTypeFormNode
</code>.
2850 Arrays passed to
<code>TagFormField::values()
</code> can contain tag names as strings and
<code>Tag
</code> objects.
2851 The default label of instances of this class is
<code>wcf.tagging.tags
</code> and their default description is
<code>wcf.tagging.tags.description
</code>.
</p>
2852 <p><code>TagFormField
</code> objects register a
<a href=
"../validation_data/#customformfielddataprocessor">custom form field data processor
</a> to add the array with entered tag names into the
<code>$parameters
</code> array directly using the object property as the array key.
</p>
2853 <h3 id=
"uploadformfield"><code>UploadFormField
</code><a class=
"headerlink" href=
"#uploadformfield" title=
"Permanent link">#
</a></h3>
2854 <p><code>UploadFormField
</code> is a form field that allows uploading files by the user.
</p>
2855 <p><code>UploadFormField
</code> objects register a
<a href=
"../validation_data/#customformfielddataprocessor">custom form field data processor
</a> to add the array of
<code>wcf\system\file\upload\UploadFile\UploadFile
</code> into the
<code>$parameters
</code> array directly using the object property as the array key. Also it registers the removed files as an array of
<code>wcf\system\file\upload\UploadFile\UploadFile
</code> into the
<code>$parameters
</code> array directly using the object property with the suffix
<code>_removedFiles
</code> as the array key.
</p>
2856 <p>The field supports additional settings:
2857 -
<code>imageOnly($imageOnly = true)
</code> and
<code>isImageOnly()
</code> can be used to ensure that the uploaded files are only images.
2858 -
<code>allowSvgImage($allowSvgImages = true)
</code> and
<code>svgImageAllowed()
</code> can be used to allow SVG images, if the image only mode is enabled (otherwise, the method will throw an exception). By default, SVG images are not allowed.
</p>
2859 <h4 id=
"provide-value-from-database-object">Provide value from database object
<a class=
"headerlink" href=
"#provide-value-from-database-object" title=
"Permanent link">#
</a></h4>
2860 <p>To provide values from a database object, you should implement the method
<code>get{$objectProperty}UploadFileLocations()
</code> to your database object class. This method must return an array of strings with the locations of the files.
</p>
2861 <h4 id=
"process-files">Process files
<a class=
"headerlink" href=
"#process-files" title=
"Permanent link">#
</a></h4>
2862 <p>To process files in the database object action class, you must
<a href=
"https://secure.php.net/manual/en/function.rename.php"><code>rename
</code></a> the file to the final destination. You get the temporary location, by calling the method
<code>getLocation()
</code> on the given
<code>UploadFile
</code> objects. After that, you call
<code>setProcessed($location)
</code> with
<code>$location
</code> contains the new file location. This method sets the
<code>isProcessed
</code> flag to true and saves the new location. For updating files, it is relevant, whether a given file is already processed or not. For this case, the
<code>UploadFile
</code> object has an method
<code>isProcessed()
</code> which indicates, whether a file is already processed or new uploaded.
</p>
2863 <h3 id=
"userformfield"><code>UserFormField
</code><a class=
"headerlink" href=
"#userformfield" title=
"Permanent link">#
</a></h3>
2864 <p><code>UserFormField
</code> is a form field to enter existing users.
2865 The class implements
<code>IAutoCompleteFormField
</code>,
<code>IAutoFocusFormField
</code>,
<code>IImmutableFormField
</code>,
<code>IMultipleFormField
</code>, and
<code>INullableFormField
</code>.
2866 While the user is presented the names of the specified users in the user interface, the field returns the ids of the users as data.
2867 The relevant
<code>UserProfile
</code> objects can be accessed via the
<code>getUsers()
</code> method.
</p>
2868 <h3 id=
"userpasswordfield"><code>UserPasswordField
</code><a class=
"headerlink" href=
"#userpasswordfield" title=
"Permanent link">#
</a></h3>
2869 <div class=
"admonition info">
2870 <p class=
"admonition-title">Only available since version
5.4.
</p>
2872 <p><code>UserPasswordField
</code> is a form field for users' to enter their current password.
2873 The class implements
<code>IAttributeFormField
</code>,
<code>IAttributeFormField
</code>,
<code>IAutoCompleteFormField
</code>,
<code>IAutoFocusFormField
</code>, and
<code>IPlaceholderFormField
</code></p>
2874 <h3 id=
"usergroupoptionformfield"><code>UserGroupOptionFormField
</code><a class=
"headerlink" href=
"#usergroupoptionformfield" title=
"Permanent link">#
</a></h3>
2875 <p><code>UserGroupOptionFormField
</code> is an
<a href=
"#itemlistformfield">item list form field
</a> to set a list of user group options/permissions.
2876 The class implements
<code>IPackagesFormField
</code> and only user group options of the set packages are considered available.
2877 The default label of instances of this class is
<code>wcf.form.field.userGroupOption
</code> and their default id is
<code>permissions
</code>.
</p>
2878 <h3 id=
"usernameformfield"><code>UsernameFormField
</code><a class=
"headerlink" href=
"#usernameformfield" title=
"Permanent link">#
</a></h3>
2879 <p><code>UsernameFormField
</code> is used for entering one non-existing username.
2880 The class implements
<code>IAttributeFormField
</code>,
<code>IImmutableFormField
</code>,
<code>IMaximumLengthFormField
</code>,
<code>IMinimumLengthFormField
</code>,
<code>INullableFormField
</code>, and
<code>IPlaceholderFormField
</code>.
2881 As usernames have a system-wide restriction of a minimum length of
3 and a maximum length of
100 characters, these values are also used as the default value for the field’s minimum and maximum length.
</p>
2882 <h2 id=
"wysiwyg-form-container">Wysiwyg form container
<a class=
"headerlink" href=
"#wysiwyg-form-container" title=
"Permanent link">#
</a></h2>
2883 <p>To integrate a wysiwyg editor into a form, you have to create a
<code>WysiwygFormContainer
</code> object.
2884 This container takes care of creating all necessary form nodes listed below for a wysiwyg editor.
</p>
2885 <div class=
"admonition warning">
2886 <p class=
"admonition-title">When creating the container object, its id has to be the id of the form field that will manage the actual text.
</p>
2888 <p>The following methods are specific to this form container class:
</p>
2890 <li><code>addSettingsNode(IFormChildNode $settingsNode)
</code> and
<code>addSettingsNodes(array $settingsNodes)
</code> can be used to add nodes to the settings tab container.
</li>
2891 <li><code>attachmentData($objectType, $parentObjectID)
</code> can be used to set the data relevant for attachment support.
2892 By default, not attachment data is set, thus attachments are not supported.
</li>
2893 <li><code>getAttachmentField()
</code>,
<code>getPollContainer()
</code>,
<code>getSettingsContainer()
</code>,
<code>getSmiliesContainer()
</code>, and
<code>getWysiwygField()
</code> can be used to get the different components of the wysiwyg form container once the form has been built.
</li>
2894 <li><code>enablePreviewButton($enablePreviewButton)
</code> can be used to set whether the preview button for the message is shown or not.
2895 By default, the preview button is shown.
2896 This method is only relevant before the form is built.
2897 Afterwards, the preview button availability can not be changed.
2898 Only available since WoltLab Suite Core
5.3.
</li>
2899 <li><code>getObjectId()
</code> returns the id of the edited object or
<code>0</code> if no object is edited.
</li>
2900 <li><code>getPreselect()
</code>,
<code>preselect($preselect)
</code> can be used to set the value of the wysiwyg tab menu's
<code>data-preselect
</code> attribute used to determine which tab is preselected.
2901 By default, the preselect is
<code>'true'
</code> which is used to pre-select the first tab.
</li>
2902 <li><code>messageObjectType($messageObjectType)
</code> can be used to set the message object type.
</li>
2903 <li><code>pollObjectType($pollObjectType)
</code> can be used to set the poll object type.
2904 By default, no poll object type is set, thus the poll form field container is not available.
</li>
2905 <li><code>supportMentions($supportMentions)
</code> can be used to set if mentions are supported.
2906 By default, mentions are not supported.
2907 This method is only relevant before the form is built.
2908 Afterwards, mention support can only be changed via the wysiwyg form field.
</li>
2909 <li><code>supportSmilies($supportSmilies)
</code> can be used to set if smilies are supported.
2910 By default, smilies are supported.
2911 This method is only relevant before the form is built.
2912 Afterwards, smiley availability can only be changed via changing the availability of the smilies form container.
</li>
2914 <h3 id=
"wysiwygattachmentformfield"><code>WysiwygAttachmentFormField
</code><a class=
"headerlink" href=
"#wysiwygattachmentformfield" title=
"Permanent link">#
</a></h3>
2915 <p><code>WysiwygAttachmentFormField
</code> provides attachment support for a wysiwyg editor via a tab in the menu below the editor.
2916 This class should not be used directly but only via
<code>WysiwygFormContainer
</code>.
2917 The methods
<code>attachmentHandler(AttachmentHandler $attachmentHandler)
</code> and
<code>getAttachmentHandler()
</code> can be used to set and get the
<code>AttachmentHandler
</code> object that is used for uploaded attachments.
</p>
2918 <h3 id=
"wysiwygpollformcontainer"><code>WysiwygPollFormContainer
</code><a class=
"headerlink" href=
"#wysiwygpollformcontainer" title=
"Permanent link">#
</a></h3>
2919 <p><code>WysiwygPollFormContainer
</code> provides poll support for a wysiwyg editor via a tab in the menu below the editor.
2920 This class should not be used directly but only via
<code>WysiwygFormContainer
</code>.
2921 <code>WysiwygPollFormContainer
</code> contains all form fields that are required to create polls and requires edited objects to implement
<code>IPollContainer
</code>.
</p>
2922 <p>The following methods are specific to this form container class:
</p>
2924 <li><code>getEndTimeField()
</code> returns the form field to set the end time of the poll once the form has been built.
</li>
2925 <li><code>getIsChangeableField()
</code> returns the form field to set if poll votes can be changed once the form has been built.
</li>
2926 <li><code>getIsPublicField()
</code> returns the form field to set if poll results are public once the form has been built.
</li>
2927 <li><code>getMaxVotesField()
</code> returns the form field to set the maximum number of votes once the form has been built.
</li>
2928 <li><code>getOptionsField()
</code> returns the form field to set the poll options once the form has been built.
</li>
2929 <li><code>getQuestionField()
</code> returns the form field to set the poll question once the form has been built.
</li>
2930 <li><code>getResultsRequireVoteField()
</code> returns the form field to set if viewing the poll results requires voting once the form has been built.
</li>
2931 <li><code>getSortByVotesField()
</code> returns the form field to set if the results are sorted by votes once the form has been built.
</li>
2933 <h3 id=
"wysiwygsmileyformcontainer"><code>WysiwygSmileyFormContainer
</code><a class=
"headerlink" href=
"#wysiwygsmileyformcontainer" title=
"Permanent link">#
</a></h3>
2934 <p><code>WysiwygSmileyFormContainer
</code> provides smiley support for a wysiwyg editor via a tab in the menu below the editor.
2935 This class should not be used directly but only via
<code>WysiwygFormContainer
</code>.
2936 <code>WysiwygSmileyFormContainer
</code> creates a sub-tab for each smiley category.
</p>
2937 <h4 id=
"wysiwygsmileyformnode"><code>WysiwygSmileyFormNode
</code><a class=
"headerlink" href=
"#wysiwygsmileyformnode" title=
"Permanent link">#
</a></h4>
2938 <p><code>WysiwygSmileyFormNode
</code> is contains the smilies of a specific category.
2939 This class should not be used directly but only via
<code>WysiwygSmileyFormContainer
</code>.
</p>
2940 <h3 id=
"example">Example
<a class=
"headerlink" href=
"#example" title=
"Permanent link">#
</a></h3>
2941 <p>The following code creates a WYSIWYG editor component for a
<code>message
</code> object property.
2942 As smilies are supported by default and an attachment object type is given, the tab menu below the editor has two tabs: “Smilies” and “Attachments”.
2943 Additionally, mentions and quotes are supported.
</p>
2944 <div class=
"highlight"><pre><span></span><code><span class=
"nx">WysiwygFormContainer
</span><span class=
"o">::
</span><span class=
"na">create
</span><span class=
"p">(
</span><span class=
"s1">'message
'</span><span class=
"p">)
</span>
2945 <span class=
"o">-
></span><span class=
"na">label
</span><span class=
"p">(
</span><span class=
"s1">'foo.bar.message
'</span><span class=
"p">)
</span>
2946 <span class=
"o">-
></span><span class=
"na">messageObjectType
</span><span class=
"p">(
</span><span class=
"s1">'com.example.foo.bar
'</span><span class=
"p">)
</span>
2947 <span class=
"o">-
></span><span class=
"na">attachmentData
</span><span class=
"p">(
</span><span class=
"s1">'com.example.foo.bar
'</span><span class=
"p">)
</span>
2948 <span class=
"o">-
></span><span class=
"na">supportMentions
</span><span class=
"p">()
</span>
2949 <span class=
"o">-
></span><span class=
"na">supportQuotes
</span><span class=
"p">()
</span>
2952 <h3 id=
"wysiwygformfield"><code>WysiwygFormField
</code><a class=
"headerlink" href=
"#wysiwygformfield" title=
"Permanent link">#
</a></h3>
2953 <p><code>WysiwygFormField
</code> is used for wysiwyg editor form fields.
2954 This class should, in general, not be used directly but only via
<code>WysiwygFormContainer
</code>.
2955 The class implements
<code>IAttributeFormField
</code>,
<code>IMaximumLengthFormField
</code>,
<code>IMinimumLengthFormField
</code>, and
<code>IObjectTypeFormNode
</code> and requires an object type of the object type definition
<code>com.woltlab.wcf.message
</code>.
2956 The following methods are specific to this form field class:
</p>
2958 <li><code>autosaveId($autosaveId)
</code> and
<code>getAutosaveId()
</code> can be used enable automatically saving the current editor contents in the browser using the given id.
2959 An empty string signals that autosaving is disabled.
</li>
2960 <li><code>lastEditTime($lastEditTime)
</code> and
<code>getLastEditTime()
</code> can be used to set the last time the contents have been edited and saved so that the JavaScript can determine if the contents stored in the browser are older or newer.
2961 <code>0</code> signals that no last edit time has been set.
</li>
2962 <li><code>supportAttachments($supportAttachments)
</code> and
<code>supportsAttachments()
</code> can be used to set and check if the form field supports attachments.
</li>
2964 <p>!!! warning
"It is not sufficient to simply signal attachment support via these methods for attachments to work. These methods are relevant internally to signal the Javascript code that the editor supports attachments. Actual attachment support is provided by <code>WysiwygAttachmentFormField</code>."
2965 -
<code>supportMentions($supportMentions)
</code> and
<code>supportsMentions()
</code> can be used to set and check if the form field supports mentions of other users.
</p>
2966 <p><code>WysiwygFormField
</code> objects register a
<a href=
"../validation_data/#customformfielddataprocessor">custom form field data processor
</a> to add the relevant simple ACL data array into the
<code>$parameters
</code> array directly using the object property as the array key.
</p>
2967 <h3 id=
"twysiwygformnode"><code>TWysiwygFormNode
</code><a class=
"headerlink" href=
"#twysiwygformnode" title=
"Permanent link">#
</a></h3>
2968 <p>All form nodes that need to know the id of the
<code>WysiwygFormField
</code> field should use
<code>TWysiwygFormNode
</code>.
2969 This trait provides
<code>getWysiwygId()
</code> and
<code>wysiwygId($wysiwygId)
</code> to get and set the relevant wysiwyg editor id.
</p>
2970 <h2 id=
"single-use-form-fields">Single-Use Form Fields
<a class=
"headerlink" href=
"#single-use-form-fields" title=
"Permanent link">#
</a></h2>
2971 <p>The following form fields are specific for certain forms and hardly reusable in other contexts.
</p>
2972 <h3 id=
"bbcodeattributesformfield"><code>BBCodeAttributesFormField
</code><a class=
"headerlink" href=
"#bbcodeattributesformfield" title=
"Permanent link">#
</a></h3>
2973 <p><code>DevtoolsProjectExcludedPackagesFormField
</code> is a form field for setting the attributes of a BBCode.
</p>
2974 <h3 id=
"devtoolsprojectexcludedpackagesformfield"><code>DevtoolsProjectExcludedPackagesFormField
</code><a class=
"headerlink" href=
"#devtoolsprojectexcludedpackagesformfield" title=
"Permanent link">#
</a></h3>
2975 <p><code>DevtoolsProjectExcludedPackagesFormField
</code> is a form field for setting the excluded packages of a devtools project.
</p>
2976 <h3 id=
"devtoolsprojectinstructionsformfield"><code>DevtoolsProjectInstructionsFormField
</code><a class=
"headerlink" href=
"#devtoolsprojectinstructionsformfield" title=
"Permanent link">#
</a></h3>
2977 <p><code>DevtoolsProjectExcludedPackagesFormField
</code> is a form field for setting the installation and update instructions of a devtools project.
</p>
2978 <h3 id=
"devtoolsprojectoptionalpackagesformfield"><code>DevtoolsProjectOptionalPackagesFormField
</code><a class=
"headerlink" href=
"#devtoolsprojectoptionalpackagesformfield" title=
"Permanent link">#
</a></h3>
2979 <p><code>DevtoolsProjectExcludedPackagesFormField
</code> is a form field for setting the optional packages of a devtools project.
</p>
2980 <h3 id=
"devtoolsprojectrequiredpackagesformfield"><code>DevtoolsProjectRequiredPackagesFormField
</code><a class=
"headerlink" href=
"#devtoolsprojectrequiredpackagesformfield" title=
"Permanent link">#
</a></h3>
2981 <p><code>DevtoolsProjectExcludedPackagesFormField
</code> is a form field for setting the required packages of a devtools project.
</p>
2995 <footer class=
"md-footer">
2997 <nav class=
"md-footer__inner md-grid" aria-label=
"Footer">
2999 <a href=
"../structure/" class=
"md-footer__link md-footer__link--prev" rel=
"prev">
3000 <div class=
"md-footer__button md-icon">
3001 <svg xmlns=
"http://www.w3.org/2000/svg" viewBox=
"0 0 24 24"><path d=
"M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11h12z"/></svg>
3003 <div class=
"md-footer__title">
3004 <div class=
"md-ellipsis">
3005 <span class=
"md-footer__direction">
3014 <a href=
"../validation_data/" class=
"md-footer__link md-footer__link--next" rel=
"next">
3015 <div class=
"md-footer__title">
3016 <div class=
"md-ellipsis">
3017 <span class=
"md-footer__direction">
3023 <div class=
"md-footer__button md-icon">
3024 <svg xmlns=
"http://www.w3.org/2000/svg" viewBox=
"0 0 24 24"><path d=
"M4 11v2h12l-5.5 5.5 1.42 1.42L19.84 12l-7.92-7.92L10.5 5.5 16 11H4z"/></svg>
3030 <div class=
"md-footer-meta md-typeset">
3031 <div class=
"md-footer-meta__inner md-grid">
3032 <div class=
"md-footer-copyright">
3034 <div class=
"md-footer-copyright__highlight">
3035 Copyright ©
2020 WoltLab GmbH
3039 <a href=
"https://squidfunk.github.io/mkdocs-material/" target=
"_blank" rel=
"noopener">
3043 <div class=
"md-footer-copyright">
3044 <a href=
"https://www.woltlab.com/legal-notice/">Legal Notice
</a>
3045 <a href=
"https://www.woltlab.com/privacy-policy/">Privacy Policy
</a>
3052 <div class=
"md-dialog" data-md-component=
"dialog">
3053 <div class=
"md-dialog__inner md-typeset"></div>
3055 <script id=
"__config" type=
"application/json">{
"base":
"../../../..",
"features": [],
"translations": {
"clipboard.copy":
"Copy to clipboard",
"clipboard.copied":
"Copied to clipboard",
"search.config.lang":
"en",
"search.config.pipeline":
"trimmer, stopWordFilter",
"search.config.separator":
"[\\s\\-]+",
"search.placeholder":
"Search",
"search.result.placeholder":
"Type to start searching",
"search.result.none":
"No matching documents",
"search.result.one":
"1 matching document",
"search.result.other":
"# matching documents",
"search.result.more.one":
"1 more on this page",
"search.result.more.other":
"# more on this page",
"search.result.term.missing":
"Missing"},
"search":
"../../../../assets/javascripts/workers/search.fb4a9340.min.js",
"version": {
"provider":
"mike"}}
</script>
3058 <script src=
"../../../../assets/javascripts/bundle.ca5457b8.min.js"></script>