• Resolved pzh20

    (@pzh20)


    I have a particular need that I want to make sure this plugin can support.

    I currently use Frontend Admin Forms, a plugin that works in the Elementor editor, but I’m looking at replacing it because of support issues.

    I have a form that creates a custom post called Photograph. That form has an image upload for the Featured Image, and some other fields. Once the user completes that form, it redirects to another page with another form where the user Edits the post created in the first step. The reason for this is that I load some JavaScript to do Face Detection and overlap the Featured Image displayed on the second form with boxes around the faces found.

    The first form redirects to the second form and uses the ACF/Save_post hook to attach the ID of the post just created to the URL of the redirect, the second page has an edit post form picking up the ID from the URL to display some of the fields of the CPT and others for the user to input the details of the people found in the JavaScript.

    The second form uses Acf Repeater fields to capture details for each of the people detected.

    The second form then saves these changes and the CPT, Photograph, is complete.

    Can your plugin achieve this requirement? Are there any tutorials I could review with anything similar?

    Later the Photograph post can be edited by any user to change or complete the details.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author philkurth

    (@philkurth)

    Hi @pzh20,

    Sounds like a very interesting use case — I haven’t explored face detection before. Mind if I ask what libraries you are using for that?

    To answer your question, you can definitely do what you are asking with a little bit of code. The basic approach is:

    1. Set up a form for creating the new posts on page A.
    2. Set up a form for editing the post on page B using the param method.
    3. Hook into the af/form/editing/post_created hook and override the form’s redirect arg to point to page B’s URL with post=$post_id in the query string.

    I’ve set up an example in our support docs for you to reference here:
    https://hookturn.freshdesk.com/support/solutions/articles/44002381600

    Hope that helps — let me know if there’s anything else.

    Cheers,
    Phil

    Thread Starter pzh20

    (@pzh20)

    Phil,

    I’m using the Clarifai api which returns an array of the faces detected and their coords on the image. I was a bit of a bitch to set up, but works really well.

    On my second page with the edit post form, it will contain a repeater field, that’s fully supported? Do you have any Javascript APIs yourself?

    REgardds
    Pete

    Plugin Author philkurth

    (@philkurth)

    Hi @pzh20,

    We don’t have a JavaScript API as such. There are things that can be done via JS but there isn’t an official Advanced Forms Pro JS API.

    Regarding repeaters: yes, you can both create and edit repeater data by using the repeater field in a form.

    Cheers,
    Phil

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Pre Sales question’ is closed to new replies.