[Flow] lost data through validation cycle on create
Bastian Waidelich
bastian at typo3.org
Fri May 29 11:56:34 CEST 2015
On 27.05.15, at 14:34, Tomas M wrote:
Hi Tomas,
> The property "$visible" is represented by a checkbox [...]
> It should be "checked" by default.
> If the user "unchecks" the checkbox and [...] validation
> loops back to the form [...]the checkbox is SET again!
You didn't mention which version of Flow you are using, but this issue
is fixed in master (3.0b1+), see [1].
Unfortunately it's a rather large and breaking change so we couldn't
backport it to older branches..
But you could always create your custom Checkbox-Viewhelper adjusting
the behavior.
Fortunately there's an easy work-around for your case:
Don't use the "checked"-argument but bind the checkbox to the
"visible"-property of your entity. For the "new" form you then need to
create a new instance manually and assign it to the view.
I created a little snippet to make it clearer [2].
[1] https://jira.typo3.org/browse/FLOW-213
[2] https://gist.github.com/bwaidelich/fd2a860777609c00b5a9
Best,
--
Bastian Waidelich
More information about the Flow
mailing list