Skip Navigation

[Resolved] Post custom post type and registering user in one form

This support ticket is created 4 years, 9 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: Africa/Casablanca (GMT+01:00)

Author
Posts
#1757741

1. For my new website I would like to let a user post a Toolset custom post type (current: "Aanvragen") and let them register as a user in the same form. Is this something that is possible?

2. Another option would be to use Gravity Forms to create the form (here I can register the user and submit a post at the same time). The only problem here is that I cannot seem to be able to populate custom fields (made in Toolset) with Gravity forms form field entries. I have reached out to the people at Gravity Forms and they send me this:

"But note that there's not any built-in support for the Toolset Types plugin. This means while Gravity Forms saves the selected choice in plain text, the Toolset Types may be expecting different format for the custom post value.

You will want to reach Toolset Types support to know what would the format expected for your custom field, once you have that information, you can use the following filter to run your own code to convert the data from plain text to whatever format Toolset Types is requiring: hidden link "

Hope that this make things clear enough. Thank you very much for your help in advance!

Kind regards,
Thomas

#1757791

Hello Thomas and thank you for contacting the Toolset support.

In fact, Toolset stores some kinds of field differently from how Gravity forms will do. For example, the date field is stored as a number, a timestamp. Checkboxes fields are stored as a serialized array. And so on, we, unfortunately, do not have documentation about it.

Even when you have all the required information on how to format the fields to suit Toolset format, you will need to write custom code on the hook that Gravity forms support suggested. So, I'll suggest using, only, Toolset with some custom code.

Toolset, currently, does not allow to register a user and create a post by the same form, but you can use a User form with generic fields, which will hold the data for the post, and then use custom code to hook into the form save action and use the data from the generic field to create the post.
Check these articles:
- https://toolset.com/course-lesson/adding-generic-fields-to-forms/
- https://toolset.com/documentation/programmer-reference/cred-api/#cred_save_data

Check these similar tickets, they may help you get what you need:
- https://toolset.com/forums/topic/have-a-band-admin-role-to-manage-cpt-band-listing-page/
- https://toolset.com/forums/topic/creating-a-custom-post-type-with-cred-and-user-registration-at-the-same-time/#post-1182310
- https://toolset.com/forums/topic/automatic-post-creation-on-registration/

I hope this helps. Let me know if you have any questions.