Skip Navigation

[Resolved] Creating a post with Formidable Forms Plugin populate fields of repeatable group

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Karachi (GMT+05:00)

This topic contains 2 replies, has 2 voices.

Last updated by williW 9 months ago.

Assisted by: Waqar.

Author
Posts
#2684632

Hello,
I use Formidable Forms for creating posts. Everything work well, I can associate Data to custom fields. Now I added to the form repeatable fields of name , surname, email affiliation and country of team members. I need a manual function for adding the content to repeatable groups.
So use the function frm_new_post hidden link to create the assossiation. From the form I get an array like this (I could also format it different if needed):

Array
(
[0] => Array
(
[wpcf-name] => Lili
[wpcf-surname] => Bety
[wpcf-email] => test@test.dir
[wpcf-affiliation] => None
[wpcf-country] => Oman
)

[1] => Array
(
[wpcf-name] => Second Test
[wpcf-surname] => dss
[wpcf-email] => kla@dni.cs
[wpcf-affiliation] => Neto
[wpcf-country] => Uganda
)

)

I want to add it to the Post Fields group "team-members" with the corresponding repeatable fields for name , surname, email affiliation and country

Is it true, that I have to add a child post for the repeatable group? Which function should I use for that?

#2684886

Hi,

Thank you for contacting us and I'd be happy to assist.

Your understanding is correct. The repeatable field group items are stored as separate and hidden custom post-type entries, and the post-type slug is the same as the slug of the repeatable field group. This post type has a one-to-many relationship with the parent post type.
(i.e. the post type in which this field group has been added)

You'll find an example usage of a function to programmatically add repeatable field group items, in this recent thread:
https://toolset.com/forums/topic/php-add-repeatable-fieds/

regards,
Waqar

#2685580

Thank you Waqar. You brought me on the right track. Thank you for posting a solution. Actually I needed another function from Formidable forms to accomplish it. The function frm_new_post does not know the post id so i could not use it for toolset_connect_posts() function. But I could sucessfully use this function hidden link