Skip Navigation

[Resolved] Gravity Form Custom Post Creation – Checkbox Field Not Populating on Posts

This support ticket is created 2 years, 11 months ago. There's a good chance that you are reading advice that it now obsolete.

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.

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/Hong_Kong (GMT+08:00)

This topic contains 3 replies, has 2 voices.

Last updated by Luo Yang 2 years, 11 months ago.

Assisted by: Luo Yang.

Author
Posts
#2574515

Tell us what you are trying to do?
Creating custom post with gravity form submission that creates a custom post that is setup by toolset. I am having issues with the checkbox fields not being transferred over to the toolset posts. I understand this is because gravity forms stores checkbox values differently.

Is there any documentation that you are following?
I've tried implementing the code from this post: https://toolset.com/forums/topic/gravity-forms-gf-custom-post-types-checkbox-mapping-defect/#post-334447, but am not having any luck.

What is the link to your site?
hidden link

#2574851

Hello,

The ticket you mentioned above is outdated(10 years ago), it won't work as expected with the latest version of Toolset plugins + gravity form.

Can you consider creating the new post with Toolset Forms plugin, which is full compatible with custom fields created with Toolset Types plugin, see our document:
https://toolset.com/home/cred/

#2575197

Hi! Thanks for pointing that out. So what I am using Gravity Forms for is to create a user registration and the users first post all in one form submission, so that's why I am not using the Toolset form in this case. Please advise!

#2576599

In my opinion, you can setup a user form for creating new users, after user submit the user form, use action hook cred_save_data to trigger a custom PHP function:
https://toolset.com/documentation/programmer-reference/cred-api/#cred_save_data

In this PHP function, create the new post:
https://developer.wordpress.org/reference/functions/wp_insert_post/