• Resolved artefactdesign

    (@artefactdesign)


    Hi

    First of all thanks for this great plugin. I am using a form to create entries for a CPT. On this form I have 2 actions:
    – first is Create user
    – second is Create post

    I am unable to affect the newly created post to author created on first action.

    Any help would be appreciated
    Greg

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Konrad Chmielewski

    (@hwk-fr)

    Hello,

    Thanks for the feedback. You have to set an “Action name” in your “Create: User Action”. For example: my-user-action. Then, enable the “Query Var” setting.

    Once you’ve done that, you’ll able to set the previously created user as post author in your “Post Action” using the following template tag: {query_var:my-user-action:ID}

    Here is a screenshot: https://i.imgur.com/WT2V8jy.png

    Please refer to the “Cheatsheet” tab for a list of template tags.

    Have a nice day!

    Regards.

    Thread Starter artefactdesign

    (@artefactdesign)

    Hello,

    Thanks for you quick answer. I follow your step by step and get well user and post created but no author is set for the new post.

    Here is the screenshot https://imgur.com/a/0vTGTt6

    Not sure this is related but I get Notice: Array to string conversion in wp-content/plugins/acf-extended/includes/modules/form/admin.php on line 2916
    on form submit

    Do I miss something?

    ACF version 5.8.9
    ACFE version 0.8.5.5

    Thanks a lot
    Greg

    Plugin Author Konrad Chmielewski

    (@hwk-fr)

    Hello,

    Okay the problem come from the predefined template tag {query_var:my-user-action:id} which is available in the list. It should be {query_var:my-user-action:ID} (with capital ID).

    Go in the file /acf-extended/includes/modules/form/admin.php line:816, and replace the line:

    "{query_var:$alias:id}" => 'User ID',

    with:

    "{query_var:$alias:ID}" => 'User ID',

    Then refresh your form admin, and reset the Post Action author, to the correct {query_var:my-user-action:ID} like in this screenshot: https://i.imgur.com/ypteIdI.png

    I’ve added the fix in Trello, it will be patched in the next update.

    Sorry for the inconvenience.

    Regards.

    Thread Starter artefactdesign

    (@artefactdesign)

    Works as it should, thanks again for your great job and amazing support

    Plugin Author Konrad Chmielewski

    (@hwk-fr)

    Hello,

    You’re welcome!

    By the way, if you enjoy this plugin, feel free to submit a review. It always helps and it’s much appreciated 🙂

    Have a nice day!

    Regards.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Assign post author to created user’ is closed to new replies.