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?

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

sirtet’s picture

here's the patch that adds a Div to the list:

sirtet’s picture

also, the label element can not be changed by code currently, no theme- or preprocess alters are possible.

jpstrikesback’s picture

Thanks 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...

jpstrikesback’s picture

double post

jpstrikesback’s picture

Status: Active » Needs review

Status: Needs review » Needs work

The last submitted patch, 2011706-allow-other-tags-for-fieldgroup-divs.patch, failed testing.

jpstrikesback’s picture

Status: Needs work » Needs review

Status: Needs review » Needs work

The last submitted patch, 2011706-allow-other-tags-for-fieldgroup-divs.patch, failed testing.

Anonymous’s picture

Issue summary: View changes

typo

karenann’s picture

jpstrikesback’s picture

Status: Needs work » Needs review

Fire up the bot

jpstrikesback’s picture

Version: 7.x-1.1 » 7.x-1.x-dev

Status: Needs review » Needs work

The last submitted patch, 9: field_group-div_instance_settings_text-20117060-9.patch, failed testing.

jpstrikesback’s picture

The last submitted patch, 3: 2011706-allow-other-tags-for-fieldgroup-divs.patch, failed testing.

karenann’s picture

Status: Needs work » Needs review
FileSize
854 bytes

Giving this another shot.

surgeonbor’s picture

#15 works for me, but in the #description, &rt; needs to be changed to & gt ;

karenann’s picture

Christopher Riley’s picture

It would be great if this was committed so we had more options without a custom module or patch.

tisteegz’s picture

Any 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.

Chris Matthews’s picture

Status: Needs review » Reviewed & tested by the community

The 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.

Anybody’s picture

Confirming 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?

Anybody’s picture

Title: allow other tags than h2 and h3 for DIV-fieldgroups » Allow other tags than h2 and h3 for DIV-fieldgroups

Any chance to commit this?