Bug #5879

It's not possible to make the multiple attribute optional

Added by Kim Lang over 5 years ago. Updated almost 5 years ago.

Status:Resolved Start date:2010-01-04
Priority:Should have Due date:2010-06-21
Assigned To:Bastian Waidelich % Done:

100%

Category:ViewHelpers
Target version:-
Has patch: Affected Flow version:

Description

In my extension i have a flexform where i can configure the attributes of every formfield.
I use the IF inline syntax in the "view" to achieve this.

This works well for all attributes except for the multiple attribute.

Example:

<f:form.Select 
    property="{fieldHelper.name}" 

     options="{fieldHelper.config.options}" 

    id="{form.name}_{fieldHelper.name}" 

    disabled="{f:if(condition: fieldHelper.config.disabled, then: 'disabled')}" 
    multiple="{f:if(condition: fieldHelper.config.multiple, then: 'multiple')}" 

    accesskey="{fieldHelper.config.accesskey}" 
    tabindex="{f:if(condition: fieldHelper.config.tabindex, then: fieldHelper.config.tabindex)}" 
/>

The problem is in the SelectViewHelper it checks only if the attribute is given not have a value.
Lines: 111, 125, 213
if ($this->arguments->hasArgument('multiple')) {

this syntax is unfortunately not working:

<f:form.Select 
    {f:if(condition: fieldHelper.config.multiple, then: 'multiple="multiple"')}
/>

Associated revisions

Revision a4986d6b
Added by Bastian Waidelich about 5 years ago

[+BUGFIX] Fluid (ViewHelpers): form.select ViewHelper did only check whether "multiple" attribute was set and not whether it was empty or not. Resolves #5879

History

#1 Updated by Sebastian Kurfuerst about 5 years ago

  • Assigned To deleted (Sebastian Kurfuerst)

#2 Updated by Bastian Waidelich about 5 years ago

  • Due date set to 2010-06-21
  • Assigned To set to Bastian Waidelich
  • Priority changed from Must have to Should have
  • Target version deleted (1.0)

#3 Updated by Bastian Waidelich about 5 years ago

  • Status changed from New to Resolved
  • % Done changed from 0 to 100

Applied in changeset r4614.

Also available in: Atom PDF