Skip Navigation

[Resolved] Integrate a "co-authors plus" field on a form

This support ticket is created 6 years 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.

Our next available supporter will start replying to tickets in about 1.18 hours from now. 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 1 reply, has 2 voices.

Last updated by Waqar 6 years ago.

Assisted by: Waqar.

Author
Posts
#1141394

Tell us what you are trying to do?
I want to add a field in my form:
hidden link

I need to add a special field that works with the plugin "Co-Authors Plus" if you look at the image:
hidden link

I would like users to be able to select an author from a dropdown list. I already installed the plugin, and you can see the box field on the custom post admin.

How is the code to add to the form in order to show this field?

Is there any documentation that you are following?
Before getting here, I've followed this:
hidden link

What is the link to your site?
hidden link

#1142027

Hi Arthur,

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

I'm afraid, there is no direct method to integrate "Co-Authors Plus" field in the front-end Toolset Forms and this will require custom code.

Although 1-1 custom programming assistance is beyond the scope of support that we provide, following points should help in getting started:

1. In your CRED form, you can add a generic field and then populate its options, using AJAX call and Select2 script library.

Following are some useful resources on these topics:

https://toolset.com/documentation/user-guides/inserting-generic-fields-into-forms/
https://codex.wordpress.org/Plugin_API/Action_Reference/wp_ajax_(action)
hidden link

Note: To learn about how the "Co-Authors Plus" manages multiple authors information, you can consult plugin's official support and documentation.

2. In the next step, you'll be able to process and save the submitted data from this form using the CRED form's "cred_submit_complete" hook.
https://toolset.com/documentation/programmer-reference/cred-api/#cred_submit_complete

For a more personalized and detailed assistance around custom programming, you can consider hiring, one of our certified consultants:
https://toolset.com/contractors/

I hope this helps.

regards,
Waqar