Support

Account

Home Forums General Issues User-Submitted Posts via ACF form

Solved

User-Submitted Posts via ACF form

  • I’m attempting to build a page on my WordPress site that will have a form where registered users can paste a YouTube link, then that data is turned into a new Post on form submission.

    I did find this tutorial: https://www.advancedcustomfields.com/resources/using-acf_form-to-create-a-new-post/. However, I’m not sure if the available options are capable of what I’m trying to do.

    Can anyone confirm if ACF is a good tool for this problem, or if there is a better approach? Thank you.

  • Hi @recoildesign

    Could you please tell me what kind of things you are trying to do? If you only need to post the link from the front end, then acf_form() would be the best way to do it.

    But if you need to get the data of the video, such as the description, then you need to use YouTube API too.

    If you want, you can always try ACF free version first. You can download it here: https://wordpress.org/plugins/advanced-custom-fields/.

    I hope this helps 🙂

  • Hi James,

    Thanks for the reply. The basic idea is: I need to create a page on my WordPress site that has a simple form for registered users. This form would have a single text input where they can copy-and-paste any YouTube URL, then submit the form.

    Where it gets more complicated is the submitted URL needs to be passed through a 3rd party API which will gather the YouTube video’s Title, Description, and Thumbnail.

    The final step is to take that data and create a new post in a certain Category and have the post attributed to the user who submitted the form. All of this needs to happen automatically.

    Also, I do own the ACF Pro version already.

  • Hi @recoildesign

    Thanks for the explanation.

    In this case, I suggest you create the new post by using the acf_form() function. To learn how to create a new post, kindly check this page: https://www.advancedcustomfields.com/resources/using-acf_form-to-create-a-new-post/.

    You can modify the saving process by using the acf/save_post hook and use the third-party API in this hook. That way you can modify the post data by using the data from the API.

    I hope this helps 🙂

  • James, thanks for your great help! Take care.

Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.