Bug #5879

It's not possible to make the multiple attribute optional

Added by Kim Lang over 12 years ago. Updated over 11 years ago.

Status:
Resolved
Priority:
Should have
Category:
ViewHelpers
Target version:
-
Start date:
2010-01-04
Due date:
2010-06-21
% Done:

100%

Estimated time:
Has patch:

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"')}
/>

#1

Updated by Sebastian Kurfuerst almost 12 years ago

  • Assignee deleted (Sebastian Kurfuerst)
#2

Updated by Bastian Waidelich almost 12 years ago

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

Updated by Bastian Waidelich almost 12 years ago

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

Applied in changeset r4614.

Also available in: Atom PDF