Support

Account

Home Forums Front-end Issues Front-End Form Without New Post?

Helping

Front-End Form Without New Post?

  • I have what may be a unique setup on a side project I’m plugging away at currently.

    The site is sports-related, and each week members of the site send in their rankings for the top 15 athletes. Right now it’s a pretty manual process and I’m trying to streamline that.

    We have a custom post type for the athletes – each post corresponding to a single athlete. So, it would make sense to just tie the ranking number to each individual post and query based on that… right?

    This saves the trouble of everybody manually putting their lists together, sending them in, having someone add up the point values for each ranking position, and then create the list.

    What I’d like to do:
    – Create a front-end form where users can search the CPT and select their rankings from 1-15 (this is technically done)
    – Have the user submit the form and update the post meta for each post in the CPT corresponding to their ranking points (this is technically done)
    – Display the rankings in the dashboard on a custom settings page for ease of reference/grabbing by an admin (this is technically done)

    So, you can see that the majority of the work here is pretty well done… but one thing has me stuck. I don’t want to create a new post/page/etc. when the form is submitted. I simply want to loop through the submitted content, adjust the post meta as needed, and bail.

    I haven’t found a way to submit an ACF form on the front-end without creating a new post.

    Is it possible at all? Is there an action or filter I can remove or hook into to avoid creating a post for this particular form?

    Thanks so much for reading – looking forward to any responses that may come my way!

  • It might be possible. It would depend on when you are doing your work. Are you using an acf/save_post filter or an acf/pre_save_post filter?

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

The topic ‘Front-End Form Without New Post?’ is closed to new replies.