Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
typo3
qfq
Commits
3985ad3e
Commit
3985ad3e
authored
Mar 01, 2019
by
Carsten Rose
Browse files
Merge branch 'F7729SELECTAsDatalist' into 'master'
F7729 select as datalist See merge request
!121
parents
a905a373
ffce6028
Pipeline
#1651
passed with stage
in 2 minutes and 39 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
extension/Documentation/Manual.rst
View file @
3985ad3e
...
...
@@ -3458,6 +3458,8 @@ Type: select
* *emptyItemAtEnd*: Existence of this item inserts an empty entry at the end of the selectlist.
* *emptyHide*: Existence of this item hides the empty entry. This is useful for e.g. Enums, which have an empty
entry and the empty value should not be an option to be selected.
* *datalist*: Similar to 'typeAhead'. Enables the user to select a predefined option (sql1, itemList) or supply any
free text. Attention: Safari (and some other) browsers do not support this fully - https://caniuse.com/#search=datalist.
.. _`subrecord-option`:
...
...
extension/Source/core/AbstractBuildForm.php
View file @
3985ad3e
...
...
@@ -2448,9 +2448,17 @@ abstract class AbstractBuildForm {
$formElement
=
HelperFormElement
::
prepareExtraButton
(
$formElement
,
false
);
$attribute
.
=
$this
->
getAttributeFeMode
(
$formElement
[
FE_MODE
]);
$html
=
'<select '
.
$attribute
.
'>'
.
$option
.
'</select>'
;
if
(
isset
(
$formElement
[
"datalist"
]))
{
if
(
$formElement
[
FE_DYNAMIC_UPDATE
]
===
'yes'
)
{
throw
new
UserFormException
(
"Datalist funktionert nicht mit dynamic update"
,
ERROR_NOT_IMPLEMENTED
);
}
$datalistId
=
$formElement
[
FE_HTML_ID
]
.
'-datalist'
;
$html
=
'<input '
.
Support
::
doAttribute
(
'list'
,
$datalistId
)
.
$attribute
.
'><datalist '
.
Support
::
doAttribute
(
'id'
,
$datalistId
)
.
'>'
.
$option
.
'</datalist>'
;
}
else
{
$html
=
'<select '
.
$attribute
.
'>'
.
$option
.
'</select>'
;
}
$html
=
$html
.
$this
->
getHelpBlock
()
.
$formElement
[
FE_TMP_EXTRA_BUTTON_HTML
];
return
$html
.
$formElement
[
FE_INPUT_EXTRA_BUTTON_INFO
];
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment