Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I needed a div, so i just added it to the module code:
427 '#options' => array('h2' => t('Header 2'), 'h3' => t('Header 3'), 'div' => t('Div')),
But why not even have a text field for that wrapper, so it can be set to anything?
Comment | File | Size | Author |
---|---|---|---|
#17 | field_group_allow-tags-in-div-field-groups_2011706-17.patch | 854 bytes | karenann |
Comments
Comment #1
sirtethere's the patch that adds a Div to the list:
Comment #2
sirtetalso, the label element can not be changed by code currently, no theme- or preprocess alters are possible.
Comment #3
jpstrikesback CreditAttribution: jpstrikesback commentedThanks sirtet!!
Here it is as a textfield, next up would be to be able to add a label class but we don't have that now anyways...
Comment #4
jpstrikesback CreditAttribution: jpstrikesback commenteddouble post
Comment #5
jpstrikesback CreditAttribution: jpstrikesback commentedComment #7
jpstrikesback CreditAttribution: jpstrikesback commented#3: 2011706-allow-other-tags-for-fieldgroup-divs.patch queued for re-testing.
Comment #8.0
(not verified) CreditAttribution: commentedtypo
Comment #9
karenann CreditAttribution: karenann commentedComment #10
jpstrikesback CreditAttribution: jpstrikesback commentedFire up the bot
Comment #11
jpstrikesback CreditAttribution: jpstrikesback commentedComment #13
jpstrikesback CreditAttribution: jpstrikesback commented3: 2011706-allow-other-tags-for-fieldgroup-divs.patch queued for re-testing.
Comment #15
karenann CreditAttribution: karenann commentedGiving this another shot.
Comment #16
surgeonbor CreditAttribution: surgeonbor commented#15 works for me, but in the #description, &rt; needs to be changed to & gt ;
Comment #17
karenann CreditAttribution: karenann as a volunteer commentedComment #18
Christopher Riley CreditAttribution: Christopher Riley commentedIt would be great if this was committed so we had more options without a custom module or patch.
Comment #19
tisteegz CreditAttribution: tisteegz commentedAny chance of this going into a release? It is kind of frustrating to only be able to choose H2 or H3.
EDIT: I am now just using html element instead of div which allows you to choose the label element.
Comment #20
Chris Matthews CreditAttribution: Chris Matthews as a volunteer commentedThe 3 year old patch in #17 to field_group.module applied cleanly to the latest field_group 7.x-1.x-dev and works good for me as well so changing the status to RTBC.
Comment #21
AnybodyConfirming RTBC for #17. I thought about a more defensive approach with listing all elements that make sense in this case. For example this can be seen in Fences module (fences.fences.inc) but well. The input is more flexible.
Are there any security concerns?
Comment #22
AnybodyAny chance to commit this?