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
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