Hi,
Is there a way to assign a different User of a post when editing/creating the post?
Many thx
Hello, I assume you mean you would like to change the post author when creating or editing a post with Forms. In wp-admin, you can choose the post author of a post in the post editor screen. If you cannot see the post author field in the post editor, you can activate it per post type in Toolset > Post Types. Edit the post type, find the "Sections to display when editing" configurations, and activate the Author field. Then in the post editor screen, you should see the Author field appear. If not, check in the Screen Options menu (top right corner of the screen) and confirm Author is activated here too.
If you want to set a different post author when creating or editing a post in Forms, this is not a built-in feature of Forms and requires some custom code using our Forms API. Do you want to choose the author from a list of Users like in a "select" or "radio" input field, or do you want to set the author to be the current logged-in User, or something else?
Example showing how to always set the post author to be the current logged-in User: https://toolset.com/forums/topic/split-how-to-change-the-post-author-when-using-a-front-end-edit-form/#post-1197070
To always set the post author to be one specific User other than the current logged-in User, you can replace get_current_user_id() in that code example with a specific User ID.
To create a list of Users and allow the User to select an author from any of those Users, it's a bit more complex. Another ticket here in the forums shows how you can implement a generic select field with dynamic User names from a View, then how to use the Forms API cred_save_data to update the post author using the selected User. This customization requires you to use the legacy View editor instead of the Blocks Editor to design the View of Users, because the Block Editor does not currently support User Views.
Let me know if you have questions about these customizations and I can offer more guidance.