Basically I have custom made content type with two fields (body and image) inside each field group.
I want to allow user to press on the button that creates field group with body and image fields inside it. (just like in attached image)

I have googled this for about 3 hour and I am real php newbie so please don't judge.
I will appreciate any tip.

Thank you.

CommentFileSizeAuthor
problem.jpg116.64 KBivars211
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

boombatower’s picture

Status: Active » Postponed (maintainer needs more info)

Use ctools exportables since field_group supports them now. See field_group.api.php hook_field_group_info(). To get a full example, create a field_group and enable the ctools bulk export module and export the field group using that. Once you take a look at the code simply determine how it fits into your usecase to pragmatically create fieldgroups.

Stalski’s picture

Tx boombatower. That is correct.
@ivars211: Let us know if you figure it out.

ivars211’s picture

Thank you for your replies. I tried to export and look through the code in hook_field_group_info() function but without success.
I am making step-by-step tutorial type website. So I would like to allow user to press on the button(add step) which displays my field group tabs(steps) with js (they could be hidden by default for example). I think horizontal-tabs.js is the file which I am looking for, but I have no idea how to do that.

Thank you again.

ivars211’s picture

Issue summary: View changes

information

nils.destoop’s picture

Issue summary: View changes
Status: Postponed (maintainer needs more info) » Closed (fixed)