Project

General

Profile

Actions

Task #82422

closed

Epic #82340: EXT:form - improve documentation

Documentation of "defaultValue"

Added by Forger Service about 7 years ago. Updated about 6 years ago.

Status:
Closed
Priority:
Should have
Assignee:
Category:
Form Framework
Target version:
-
Start date:
2017-09-09
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
8
PHP Version:
Tags:
Documentation
Complexity:
Sprint Focus:
Remote Sprint

Description

Add the defaultValue option, supported by form viewhelper also to SingleSelect of ext:form, so one could define a preselected value of a select-field.
This issue was automatically created from https://github.com/TYPO3/TYPO3.CMS/pull/81

I will give an example here (after being rejected):

you add a select for countries, derived from static_info_tables.
you want e.g. germany or austria preselected in this dropdown.

if you have only the prependOption possibilites, which Ralf Zimmermann labels as 'implemented' you need to grab that values in your array of your field.
you need to remove them from there and add key and value to prependOption key and value.
brutal.

furthermore you will destroy the ordering of the select, suddenly being germany the very first entry of the select. therefore you are breaking the navigation via keyboard through the options of the select, at least for these users, who want to fast-forward to the countries starting with 'G' ...


Files

form_backend.png (26.2 KB) form_backend.png Ralf Zimmermann, 2017-09-11 13:00
Actions

Also available in: Atom PDF