Project

General

Profile

Actions

Bug #64532

closed

Epic #69347: EXT:form - Optimize form wizard

sysExt:Form Wizard taking Select->Option->value into Account

Added by Stephan Ude over 9 years ago. Updated over 8 years ago.

Status:
Closed
Priority:
Should have
Assignee:
Category:
Form Framework
Target version:
-
Start date:
2015-01-27
Due date:
% Done:

0%

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

Description

This is about the form extension of TYPO3 6.2. I have not tested the behaviour described below in other TYPO3 versions.

Currently the value attribute of select box options is not really used by the form extension. You can set the option value by adding the variable 'value' to the TypoScript object - an index is used if it is not set - but even the standard MailPostProcessor is not using this value. Instead it is sending the (HTML-)content of the option tag (data).

10 = SELECT
10 {
    name = salutation
    label {
        value = Salutation
    }
    10 = OPTION
    10 {
        data = Mr
        selected = selected
        value = 1
    }
    20 = OPTION
    20 {
        data = Mrs
        value = 2
    }
}

The wizard itself is ignoring the 'value' attribute completely. Even if you set the value in the TypoScript of your form, it will be deleted when the form is being saved with the form wizard.

In my opinion this behaviour should be changed. The data of an option tag is the label shown to the website user. It is not an ID or code, it may change any time and it even may be translated. This is not the right data for a PostProcessor.

I don't have a patch for the standard MailPostProcessor (and I guess it won't be changed anyway as the extension shall be backward compatible), but I did a patch for the form wizard so that one is able to edit and save the value field of a select option correctly.

With this patch (I hope the format is okay, I am a newbie to all this) we are at least able to handle the value attribute in our own PostProcessors. That would be great. As long as the wizard is deleting the value attribute on any save action, we are unable to use it anywhere.


Files


Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Feature #69409: Forms: allow value attribute of OPTION object in wizardClosed2015-08-29

Actions
Actions

Also available in: Atom PDF