Bug #9454
If condition in viewhelper attribute
| Status: | Rejected | Start date: | 2010-08-25 | |
|---|---|---|---|---|
| Priority: | Won't have this time | Due date: | ||
| Assignee: | Adrian Föder | % Done: | 0% |
|
| Category: | ViewHelpers | |||
| Target version: | - | |||
| Has patch: | No | FLOW3 version affected: | FLOW3 1.0.0 | |
| Votes: | 1 (View) |
Description
It should be possible to set an attribute in a viewhelper by an if condition.
For example i want to set the attribute onchange conditional by an object property:
<f:form.checkBox name="name" value="value" additionalAttributes="{f:if (condition: '{object.submitOnChange}', then: '{onchange : \'submit()\'}')}" />
Fluid throws the exception: #1237900529: The argument "additionalAttributes" was registered with type "array", but is of type "string".
Related issues
| duplicated by TYPO3.Fluid - Bug #42474: Possible bug with short form conditions in viewhelper tags | Closed | 2012-10-29 |
History
Updated by Karsten Dambekalns over 1 year ago
- FLOW3 version affected set to FLOW3 1.0.0
Updated by Adrian Föder 6 months ago
- Category changed from Core to ViewHelpers
- Status changed from New to Rejected
- Assignee set to Adrian Föder
- Priority changed from Should have to Won't have this time
- Has patch set to No
compare to #42474; since you want to omit the attribute at all, you have no other choice than to make the whole tag conditional.