Closed (fixed)
Project:
Bootstrap
Version:
7.x-3.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
5 Feb 2014 at 06:04 UTC
Updated:
30 Jul 2014 at 06:20 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
markhalliwellI do not see how this is useful, where else is
#parent_attributesbeing used? This is definitely not a Drupal Best Practices™ method. What exactly is it you are attempting to accomplish here? Please provide code examples.Comment #2
j0rd commentedform elements in grid layout and adding classes to the parent form-group, which I needed for some JS widgets.
Drupal is not build really well to handle the flexibility of styling in theme frameworks like bootstrap. So you can nurf the theme for Drupal, or you can extend Drupal to handle more options of bootstrap.
Here's an example of the form I was able to create using this method. With out this method, a bunch of theme overwrites would have had to of been written.
Really the patch just allows for some added (and optional) flexibility.
As for where "#parent_attributes" is being used, it's just used to initialize the $attributes variable, which you then use in the parent group.
You can see that here
So really the patch just allows me to extend the parent div how ever I want in form API, instead of having to override it for each specific case (of which there are lots)
Example of my use in code:
Comment #3
markhalliwellAhh. Gotcha. The whole "parent" thing is what threw me, sorry for the misunderstanding. You are correct, however it should really be called
#wrapper_attributes.Committed 3b7a855 to 7.x-3.x:
Comment #4
j0rd commented(y) thanks.
Comment #7
ryan.armstrong commentedMoving this to the 8.x-3.x branch as it has been committed to that branch. Making sure the fix gets tested in the Drupal 8 release.
Comment #8
ryan.armstrong commentedComment #11
markhalliwellI'm just moving this back to 7.x. If there needs to be any re-evaluation for 8.x, create a new issue.