Navigation überspringen

[Gelöst] Integrate a "co-authors plus" field on a form

This support ticket is created vor 6 Jahren, 3 Monaten. 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/Karachi (GMT+05:00)

Dieses Thema enthält 1 Antwort, hat 2 Stimmen.

Zuletzt aktualisiert von Waqar vor 6 Jahren, 3 Monaten.

Assistiert von: Waqar.

Author
Artikel
#1141394

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

I need to add a special field that works with the plugin "Co-Authors Plus" if you look at the image:
versteckter 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:
versteckter Link

What is the link to your site?
versteckter 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)
versteckter 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