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

[Form] [Hotfix] Get Elements for Collection #4231

Conversation

davidwindell
Copy link
Contributor

At present the useInputFilterDefaults flag on Forms doesn't work correctly with Collections that have a Fieldset attached as their target elements. This means that data may go unfiltered when it is expected to be using the filters/validators available on Form Elements.

This PR allows retrieval of the elements of the target element via the collection so that the correct defaults can be applied.

@@ -330,6 +330,19 @@ public function getTargetElement()
}

/**
* {@inheritdoc}
*
* If the target element is a FieldsetInterface, return it's attached elements
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/it's/its/ (possessive, not contraction) (I will do this on merge, most likely)

@weierophinney
Copy link
Member

@davidwindell Ping me when you've made the changes you and @bakura10 have discussed.

@davidwindell
Copy link
Contributor Author

Ping @weierophinney OK, i've refactored that now. The only thing I can see missing for future consideration is that we don't have handling for any fieldsets within the target element (fieldset) of a Collection.

@ghost ghost assigned weierophinney Apr 17, 2013
weierophinney added a commit that referenced this pull request Apr 17, 2013
…ments

[Form] [Hotfix] Get Elements for Collection
weierophinney added a commit that referenced this pull request Apr 17, 2013
@weierophinney weierophinney merged commit 3123818 into zendframework:develop Apr 17, 2013
@davidwindell davidwindell deleted the hotfix-form-collection-elements branch April 17, 2013 13:54
This was referenced Apr 26, 2013
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants