Closed (fixed)
Project:
Bootstrap
Version:
7.x-3.0-rc1
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
27 Sep 2013 at 02:44 UTC
Updated:
27 Oct 2013 at 06:00 UTC
Jump to comment: Most recent file
Comments
Comment #1
markhalliwellSorry to do this, but I was in the middle of #2098175: Clean up files and now the structure has completely changed (to be easier for maintaining). Please re-roll your patch against the latest HEAD. Also, be sure to read the documentation in template.php to understand what has changed. Thanks!
Comment #2
brian_ak commentedNo prob @mark. updated patch is attached.
Comment #3
brian_ak commentedComment #4
markhalliwellThanks @brian_ak!
Committed 313bb6e to 7.x-3.x.
Committed fec0fa5 to 7.x-3.x.
I went ahead and changed some of the logic. One must now specify
#input_group => TRUEfor it to wrap#field_prefixand#field_suffixwith.input-group-addonand the wrapping.input-groupdiv. The reason for this logic change is because there are times when one will need to specify either the prefix or suffix, but not necessary need those wrappers (and subsequent styling). An example of this would be:Comment #5
markhalliwellOn a side note, if there are certain elements in [core] forms that you think would benefit from the new
#input_group => TRUE, create new issues to alter the forms :)Comment #6
brian_ak commentedGreat, thanks Mark!
Comment #7
markhalliwellComment #8
hypertext200It make sense to add field settings alter to allow #input_group in field level. So reopening.
Comment #9
hypertext200This little work around added an option to the number and text field(text fields don't have prefix/suffix tho) and you can choose to use it with input groups. Hope this will help.
I tried to add this code to alter.inc but it didn't works and it looks like hook_form_alter doesn't look for themes it'll just search for modules.
Comment #10
markhalliwellThis would make it a feature then (since this type of functionality didn't exist before). This issue was simply about fixing the existing #field_prefix and #field_suffix properties.
Alters do work on themes, we have several form alters in Bootstrap already. The caveat though: only works if that theme is the one being used for that page request (ie: admin theme might be different). Regardless, I agree this functionality should probably be handled by a module anyhow, which is why I created https://drupal.org/project/bootstrap_ux, just for this type of thing.
Comment #11
hypertext200@Mark Carver, that's great, I'll create a patch for the UX module.
Comment #12
hypertext200Follow up #2110765: Add settings to toggle #input_group on fields in UI for more details.