[FEATURE] Add HTML5 date form element
[Packages/TYPO3.CMS.git] / typo3 / sysext / form / Configuration / Yaml / BaseSetup.yaml
1 TYPO3:
2 CMS:
3 Form:
4 persistenceManager:
5 allowedFileMounts:
6 10: 1:/form_definitions/
7 20: 1:/user_upload/
8 allowSaveToExtensionPaths: false
9 allowDeleteFromExtensionPaths: false
10 #allowedExtensionPaths:
11 #10: EXT:example/Resources/Private/Forms/
12
13 prototypes:
14 standard:
15
16 ########### DEFAULT FORM ELEMENT DEFINITIONS ###########
17 formElementsDefinition:
18
19 ### BASE ELEMENTS ###
20 Form:
21 __inheritances:
22 10: 'TYPO3.CMS.Form.mixins.formElementMixins.BaseFormElementMixin'
23 rendererClassName: 'TYPO3\CMS\Form\Domain\Renderer\FluidFormRenderer'
24 renderingOptions:
25 __inheritances:
26 10: 'TYPO3.CMS.Form.mixins.translationSettingsMixin'
27 templateRootPaths:
28 10: 'EXT:form/Resources/Private/Frontend/Templates/'
29 partialRootPaths:
30 10: 'EXT:form/Resources/Private/Frontend/Partials/'
31 layoutRootPaths:
32 10: 'EXT:form/Resources/Private/Frontend/Layouts/'
33 addQueryString: false
34 argumentsToBeExcludedFromQueryString: []
35 additionalParams: []
36 controllerAction: perform
37 httpMethod: post
38 httpEnctype: 'multipart/form-data'
39 _isCompositeFormElement: false
40 _isTopLevelFormElement: true
41
42 honeypot:
43 enable: true
44 formElementToUse: 'Honeypot'
45
46 submitButtonLabel: 'Submit'
47
48 # set this to TRUE if you want to avoid exceptions for FormElements without definitions
49 skipUnknownElements: true
50
51 ### FORM ELEMENTS: CONTAINER ###
52 Page:
53 __inheritances:
54 10: 'TYPO3.CMS.Form.mixins.formElementMixins.BaseFormElementMixin'
55 implementationClassName: 'TYPO3\CMS\Form\Domain\Model\FormElements\Page'
56 renderingOptions:
57 _isTopLevelFormElement: true
58 _isCompositeFormElement: true
59 nextButtonLabel: 'next Page'
60 previousButtonLabel: 'previous Page'
61
62 SummaryPage:
63 __inheritances:
64 10: 'TYPO3.CMS.Form.prototypes.standard.formElementsDefinition.Page'
65 renderingOptions:
66 _isTopLevelFormElement: true
67 _isCompositeFormElement: false
68 nextButtonLabel: 'next Page'
69 previousButtonLabel: 'previous Page'
70
71 Fieldset:
72 __inheritances:
73 10: 'TYPO3.CMS.Form.mixins.formElementMixins.FormElementMixin'
74 implementationClassName: 'TYPO3\CMS\Form\Domain\Model\FormElements\Section'
75 renderingOptions:
76 _isCompositeFormElement: true
77
78 GridContainer:
79 __inheritances:
80 10: 'TYPO3.CMS.Form.mixins.formElementMixins.FormElementMixin'
81 implementationClassName: 'TYPO3\CMS\Form\Domain\Model\FormElements\GridContainer'
82 renderingOptions:
83 _isCompositeFormElement: true
84 _isGridContainerFormElement: true
85 properties:
86 elementClassAttribute: 'container'
87 # overrules 'GridRow.properties.gridColumnClassAutoConfiguration'
88 gridColumnClassAutoConfiguration:
89 gridSize: 12
90 viewPorts:
91 xs:
92 classPattern: 'col-xs-{@numbersOfColumnsToUse}'
93 sm:
94 classPattern: 'col-sm-{@numbersOfColumnsToUse}'
95 md:
96 classPattern: 'col-md-{@numbersOfColumnsToUse}'
97 lg:
98 classPattern: 'col-lg-{@numbersOfColumnsToUse}'
99
100 GridRow:
101 __inheritances:
102 10: 'TYPO3.CMS.Form.mixins.formElementMixins.FormElementMixin'
103 implementationClassName: 'TYPO3\CMS\Form\Domain\Model\FormElements\GridRow'
104 properties:
105 elementClassAttribute: 'row'
106 gridColumnClassAutoConfiguration:
107 gridSize: 12
108 viewPorts:
109 xs:
110 classPattern: 'col-xs-{@numbersOfColumnsToUse}'
111 sm:
112 classPattern: 'col-sm-{@numbersOfColumnsToUse}'
113 md:
114 classPattern: 'col-md-{@numbersOfColumnsToUse}'
115 lg:
116 classPattern: 'col-lg-{@numbersOfColumnsToUse}'
117 renderingOptions:
118 _isCompositeFormElement: true
119 _isGridRowFormElement: true
120
121 ### FORM ELEMENTS: INPUT ###
122 Text:
123 __inheritances:
124 10: 'TYPO3.CMS.Form.mixins.formElementMixins.TextMixin'
125
126 Password:
127 __inheritances:
128 10: 'TYPO3.CMS.Form.mixins.formElementMixins.TextMixin'
129
130 AdvancedPassword:
131 __inheritances:
132 10: 'TYPO3.CMS.Form.prototypes.standard.formElementsDefinition.Password'
133 implementationClassName: 'TYPO3\CMS\Form\Domain\Model\FormElements\GenericFormElement'
134 properties:
135 elementClassAttribute: 'input-medium'
136 confirmationLabel: ''
137 # Optional description (hint) for the first password input element
138 #passwordDescription: ''
139 confirmationClassAttribute: 'input-medium'
140
141 Textarea:
142 __inheritances:
143 10: 'TYPO3.CMS.Form.mixins.formElementMixins.TextMixin'
144 properties:
145 elementClassAttribute: 'xxlarge'
146
147 Honeypot:
148 __inheritances:
149 10: 'TYPO3.CMS.Form.mixins.formElementMixins.TextMixin'
150 properties:
151 renderAsHiddenField: false
152 styleAttribute: 'position:absolute; margin:0 0 0 -999em;'
153 renderingOptions:
154 _isHiddenFormElement: true
155
156 Hidden:
157 __inheritances:
158 10: 'TYPO3.CMS.Form.mixins.formElementMixins.FormElementMixin'
159 renderingOptions:
160 _isHiddenFormElement: true
161
162 ### FORM ELEMENTS: HTML5 ###
163 Email:
164 __inheritances:
165 10: 'TYPO3.CMS.Form.mixins.formElementMixins.TextMixin'
166 validators:
167 -
168 identifier: EmailAddress
169
170 Telephone:
171 __inheritances:
172 10: 'TYPO3.CMS.Form.mixins.formElementMixins.TextMixin'
173 validators:
174 -
175 identifier: RegularExpression
176 options:
177 regularExpression: '/^.*$/'
178
179 Url:
180 __inheritances:
181 10: 'TYPO3.CMS.Form.mixins.formElementMixins.TextMixin'
182 validators:
183 -
184 identifier: RegularExpression
185 options:
186 regularExpression: '/^.*$/'
187
188 Number:
189 __inheritances:
190 10: 'TYPO3.CMS.Form.mixins.formElementMixins.TextMixin'
191 validators:
192 -
193 identifier: Number
194
195 Date:
196 __inheritances:
197 10: 'TYPO3.CMS.Form.mixins.formElementMixins.TextMixin'
198 properties:
199 # Rules for the summary step, email finishers etc. but
200 # **not** for the form element value itself.
201 # The display format of the form element value depends on the browser settings.
202 displayFormat: 'd.m.Y'
203 fluidAdditionalAttributes:
204 # https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/date#Handling_browser_support
205 # https://tools.ietf.org/html/rfc3339#section-5.6 -> full-date
206 pattern: '([0-9]{4})-(0[1-9]|1[012])-(0[1-9]|1[0-9]|2[0-9]|3[01])'
207
208 ### FORM ELEMENTS: SELECT ###
209 Checkbox:
210 __inheritances:
211 10: 'TYPO3.CMS.Form.mixins.formElementMixins.FormElementMixin'
212 properties:
213 elementClassAttribute: 'add-on'
214 containerClassAttribute: 'input checkbox'
215 value: 1
216
217 MultiCheckbox:
218 __inheritances:
219 10: 'TYPO3.CMS.Form.mixins.formElementMixins.MultiSelectionMixin'
220 properties:
221 containerClassAttribute: 'input checkbox'
222
223 MultiSelect:
224 __inheritances:
225 10: 'TYPO3.CMS.Form.mixins.formElementMixins.MultiSelectionMixin'
226 properties:
227 elementClassAttribute: 'xlarge'
228
229 RadioButton:
230 __inheritances:
231 10: 'TYPO3.CMS.Form.mixins.formElementMixins.SingleSelectionMixin'
232 properties:
233 elementClassAttribute: 'xlarge'
234
235 SingleSelect:
236 __inheritances:
237 10: 'TYPO3.CMS.Form.mixins.formElementMixins.SingleSelectionMixin'
238
239 ### FORM ELEMENTS: CUSTOM ###
240 DatePicker:
241 __inheritances:
242 10: 'TYPO3.CMS.Form.mixins.formElementMixins.FormElementMixin'
243 properties:
244 elementClassAttribute: 'small form-control'
245 timeSelectorClassAttribute: 'mini'
246 timeSelectorHourLabel: ''
247 timeSelectorMinuteLabel: ''
248 dateFormat: 'Y-m-d'
249 enableDatePicker: true
250 displayTimeSelector: false
251
252 StaticText:
253 __inheritances:
254 10: 'TYPO3.CMS.Form.mixins.formElementMixins.ReadOnlyFormElementMixin'
255 properties:
256 text: ''
257
258 ContentElement:
259 __inheritances:
260 10: 'TYPO3.CMS.Form.mixins.formElementMixins.ReadOnlyFormElementMixin'
261 properties:
262 contentElementUid: ''
263
264 ### FORM ELEMENTS: UPLOADS ###
265 FileUpload:
266 __inheritances:
267 10: 'TYPO3.CMS.Form.mixins.formElementMixins.FileUploadMixin'
268 properties:
269 allowedMimeTypes: ['application/msword', 'application/vnd.openxmlformats-officedocument.wordprocessingml.document', 'application/vnd.oasis.opendocument.text', 'application/pdf']
270
271 ImageUpload:
272 __inheritances:
273 10: 'TYPO3.CMS.Form.mixins.formElementMixins.FileUploadMixin'
274 properties:
275 allowedMimeTypes: ['image/jpeg', 'image/png', 'image/bmp']
276 elementClassAttribute: 'lightbox'
277 imageLinkMaxWidth: 500
278 imageMaxWidth: 500
279 imageMaxHeight: 500
280
281 ### FINISHERS ###
282
283 finishersDefinition:
284 Closure:
285 implementationClassName: 'TYPO3\CMS\Form\Domain\Finishers\ClosureFinisher'
286 options:
287 #closure:
288
289 Confirmation:
290 implementationClassName: 'TYPO3\CMS\Form\Domain\Finishers\ConfirmationFinisher'
291 #options:
292 #message: ''
293 #contentElementUid: 0
294 #typoscriptObjectPath: 'lib.tx_form.contentElementRendering'
295
296 EmailToSender:
297 __inheritances:
298 10: 'TYPO3.CMS.Form.mixins.finishersEmailMixin'
299
300 EmailToReceiver:
301 __inheritances:
302 10: 'TYPO3.CMS.Form.mixins.finishersEmailMixin'
303
304 DeleteUploads:
305 implementationClassName: 'TYPO3\CMS\Form\Domain\Finishers\DeleteUploadsFinisher'
306
307 FlashMessage:
308 implementationClassName: 'TYPO3\CMS\Form\Domain\Finishers\FlashMessageFinisher'
309 #options:
310 #messageBody: ''
311 #messageTitle: ''
312 #messageArguments: {}
313 #messageCode: 0
314 #severity: 0
315
316 Redirect:
317 implementationClassName: 'TYPO3\CMS\Form\Domain\Finishers\RedirectFinisher'
318 #options:
319 #pageUid: 1
320 #additionalParameters: ''
321 #delay: 0
322 #statusCode: 303
323
324 SaveToDatabase:
325 implementationClassName: 'TYPO3\CMS\Form\Domain\Finishers\SaveToDatabaseFinisher'
326 #options:
327 #table: ''
328 #mode: 'insert'
329 #whereClause: []
330 #elements:
331 # <elementIdentifier>:
332 # mapOnDatabaseColumn: <databaseColumnName>
333 # saveFileIdentifierInsteadOfUid: false
334 # skipIfValueIsEmpty: false
335 #databaseColumnMappings:
336 # <databaseColumnName>:
337 # value: 'someValue'
338 # skipIfValueIsEmpty: false
339
340 ### VALIDATORS ###
341 validatorsDefinition:
342 NotEmpty:
343 implementationClassName: 'TYPO3\CMS\Extbase\Validation\Validator\NotEmptyValidator'
344 DateTime:
345 implementationClassName: 'TYPO3\CMS\Extbase\Validation\Validator\DateTimeValidator'
346 Alphanumeric:
347 implementationClassName: 'TYPO3\CMS\Extbase\Validation\Validator\AlphanumericValidator'
348 Text:
349 implementationClassName: 'TYPO3\CMS\Extbase\Validation\Validator\TextValidator'
350 StringLength:
351 implementationClassName: 'TYPO3\CMS\Extbase\Validation\Validator\StringLengthValidator'
352 #options:
353 #minimum: 0
354 #maximum: 0
355 EmailAddress:
356 implementationClassName: 'TYPO3\CMS\Extbase\Validation\Validator\EmailAddressValidator'
357 Integer:
358 implementationClassName: 'TYPO3\CMS\Extbase\Validation\Validator\IntegerValidator'
359 Float:
360 implementationClassName: 'TYPO3\CMS\Extbase\Validation\Validator\FloatValidator'
361 Number:
362 implementationClassName: 'TYPO3\CMS\Extbase\Validation\Validator\NumberValidator'
363 NumberRange:
364 implementationClassName: 'TYPO3\CMS\Extbase\Validation\Validator\NumberRangeValidator'
365 #options:
366 #minimum: 0
367 #maximum: 0
368 RegularExpression:
369 implementationClassName: 'TYPO3\CMS\Extbase\Validation\Validator\RegularExpressionValidator'
370 #options:
371 #regularExpression: '/^.*$/'
372 Count:
373 implementationClassName: 'TYPO3\CMS\Form\Mvc\Validation\CountValidator'
374 #options:
375 #minimum: 0
376 #maximum: 0
377 FileSize:
378 implementationClassName: 'TYPO3\CMS\Form\Mvc\Validation\FileSizeValidator'
379 #options:
380 #minimum: '0B'
381 #maximum: '10M'
382 DateRange:
383 implementationClassName: 'TYPO3\CMS\Form\Mvc\Validation\DateRangeValidator'
384 options:
385 # https://tools.ietf.org/html/rfc3339#section-5.6 -> full-date
386 format : 'Y-m-d'
387 #minimum: '2018-03-17'
388 #maximum: '2018-03-17'
389
390 ########### MIXINS ###########
391 mixins:
392 translationSettingsMixin:
393 translation:
394 translationFile: 'EXT:form/Resources/Private/Language/locallang.xlf'
395 #translatePropertyValueIfEmpty: true
396
397 ########### FORM ELEMENT MIXINS ###########
398 formElementMixins:
399 BaseFormElementMixin: []
400 # The form element type is chosen as the template name by default.
401 # If you want another name you can set it with 'templateName'
402 #templateName: 'CustomTemplateName'
403
404 ReadOnlyFormElementMixin:
405 __inheritances:
406 10: 'TYPO3.CMS.Form.mixins.formElementMixins.BaseFormElementMixin'
407 implementationClassName: 'TYPO3\CMS\Form\Domain\Model\FormElements\GenericFormElement'
408 renderingOptions:
409 _isReadOnlyFormElement: true
410
411 FormElementMixin:
412 __inheritances:
413 10: 'TYPO3.CMS.Form.mixins.formElementMixins.BaseFormElementMixin'
414 implementationClassName: 'TYPO3\CMS\Form\Domain\Model\FormElements\GenericFormElement'
415 properties:
416 containerClassAttribute: 'input'
417 elementClassAttribute: ''
418 elementErrorClassAttribute: 'error'
419 #gridColumnClassAutoConfiguration:
420 # viewPorts:
421 # xs:
422 # numbersOfColumnsToUse: ''
423 # sm:
424 # numbersOfColumnsToUse: ''
425 # md:
426 # numbersOfColumnsToUse: ''
427 # lg:
428 # numbersOfColumnsToUse: ''
429
430 TextMixin:
431 __inheritances:
432 10: 'TYPO3.CMS.Form.mixins.formElementMixins.FormElementMixin'
433
434 SelectionMixin:
435 __inheritances:
436 10: 'TYPO3.CMS.Form.mixins.formElementMixins.FormElementMixin'
437
438 SingleSelectionMixin:
439 __inheritances:
440 10: 'TYPO3.CMS.Form.mixins.formElementMixins.SelectionMixin'
441
442 MultiSelectionMixin:
443 __inheritances:
444 10: 'TYPO3.CMS.Form.mixins.formElementMixins.SelectionMixin'
445
446 FileUploadMixin:
447 __inheritances:
448 10: 'TYPO3.CMS.Form.mixins.formElementMixins.FormElementMixin'
449 implementationClassName: 'TYPO3\CMS\Form\Domain\Model\FormElements\FileUpload'
450 properties:
451 saveToFileMount: '1:/user_upload/'
452
453 finishersEmailMixin:
454 implementationClassName: 'TYPO3\CMS\Form\Domain\Finishers\EmailFinisher'
455 options:
456 #subject: ''
457 #recipientAddress: ''
458 #recipientName: ''
459 #senderAddress:
460 #senderName: ''
461 #replyToAddress: ''
462 #carbonCopyAddress: ''
463 #blindCarbonCopyAddress: ''
464 #format: 'html'
465 #attachUploads: true
466 #translation:
467 # language: 'default'
468 # {@format} depends the 'format' value
469 templateName: '{@format}.html'
470 templateRootPaths:
471 10: 'EXT:form/Resources/Private/Frontend/Templates/Finishers/Email/'
472 #partialRootPaths: []
473 #layoutRootPaths: []
474 #variables: {}