Project

General

Profile

Actions

Bug #81988

closed

sysExt:Form Wizard taking Select->prependOptionLabel/prependOptionValue into Account

Added by Stephan Ude over 7 years ago. Updated over 7 years ago.

Status:
Rejected
Priority:
Should have
Assignee:
-
Category:
Form Framework
Target version:
-
Start date:
2017-07-27
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
7
PHP Version:
5.6
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

The Select element has a couple of options available in Fluid which are not taken into account by the Form Wizard.

From sysext:form, version 7.6.0, form/Resources/Private/Partials/Default/Show/FlatElements/Select.html:

<form:select
    class="{model.additionalArguments.class}" 
    dir="{model.additionalArguments.dir}" 
    id="{model.additionalArguments.id}" 
    lang="{model.additionalArguments.lang}" 
    style="{model.additionalArguments.style}" 
    title="{model.additionalArguments.title}" 
    accesskey="{model.additionalArguments.accesskey}" 
    tabindex="{model.additionalArguments.tabindex}" 
    onclick="{model.additionalArguments.onclick}" 

    name="{model.additionalArguments.prefix}[{model.additionalArguments.name}]" 
    value="{form:aggregateSelectOptions(model:model, returnSelectedValues: 1)}" 

    multiple="{model.additionalArguments.multiple}" 
    size="{model.additionalArguments.size}" 

    optionLabelField="label" 
    optionValueField="value" 
    options="{form:aggregateSelectOptions(model:model)}" 
    prependOptionLabel="{model.additionalArguments.prependOptionLabel}" 
    prependOptionValue="{model.additionalArguments.prependOptionValue}" 
    selectAllByDefault="{model.additionalArguments.selectAllByDefault}" 
    sortByOptionLabel="{model.additionalArguments.sortByOptionLabel}" 

    errorClass="{model.additionalArguments.errorClass}" 
    additionalAttributes="{model.htmlAttributes}" 
/>

For example you can add the TypoScript options prependOptionLabel and prependOptionValue:

10 = SELECT
10 {
    name = country
    label {
        value = Country
    }
    prependOptionLabel = Please Select
    prependOptionValue =
    10 = OPTION
    10 {
        text = Some Country
        value = some_country_code
    }
}

This is working fine but as soon as you open and save the form with the wizard, it will discard those options.

Especially for those two options it is kind of important to have them taken into account by the wizard because they can be used to insert a blank option to a select box. This is not possible within the wizard because options without a value will get a number as value automatically later on (which is fine, I guess, since we have this prependOption options). Without such a possibility making a select box required doesn't make any sense because there can't be an option with an empty value.

It would be even cooler if the wizard would also support these options so that you can set them inside instead of setting them in the TypoScript.

(Also, I haven't had a look at the other options - like selectAllByDefault - but it might be a good idea to support them in the wizard as well.)

PS: I have reported a similar bug/feature request in the past. Maybe this is helping somehow. #64532, #69409

Actions #1

Updated by Wouter Wolters over 7 years ago

  • Status changed from New to Rejected

Hi, thanks for the report. The form extension has been completely rewritten in version 8 and this is not needed there.
Version 7 won't receive this kind of functionality anymore because it is in high priority fixes and security fixes mode only.

Actions

Also available in: Atom PDF