Skip to content
This repository has been archived by the owner on Jan 8, 2020. It is now read-only.

Form\View\Helper\FormRow label position gets overwritten by __invoke() #5699

Closed
sparrowek opened this issue Jan 9, 2014 · 2 comments
Closed

Comments

@sparrowek
Copy link

I think that when resolving the issue #4771
you accidently introduced another one! Consider this code:

$this->formRow($element1, 'append');
$this->formRow($element2);

In version 2.2.1 this code created the first element with label appended and the second one with label prepended. After we upgraded to 2.2.5 we get both labels appednded. I think this is wrong because we are not changing the label position via setLabelPosition() so I would expect the change to be temporary but it is global.
Anyway this breaks the code that was working with the older zf version...

@Martin-P
Copy link
Contributor

I reported the same issue and it was fixed 10 months ago in #3626 and indeed 7 months ago #4771 introduced the same bug again...

I agree with you the caching of label positions is unwanted behaviour. Because some people want to set the label position for all elements, I think a new method where the default label position can be set would be the solution to this. If we don't we will keep going back and forth with both groups "fixing" the issue.

Martin-P added a commit to Martin-P/zf2 that referenced this issue Jan 23, 2014
@stefanotorresi
Copy link
Contributor

please close this and use #5742 for further discussions

@Ocramius Ocramius added this to the 2.4.0 milestone Apr 14, 2014
@Ocramius Ocramius self-assigned this Apr 14, 2014
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants