When I modify a post I want to display the WP author who last modified. Checked back end of the site and it doesn't appear to be capturing the author at all when I modify the post.
Do I need to create a field on the form that gets the author? Apologies I'm not great with this stuff!
Hello, let me make sure I understand what you want to change and where you want to display the author information.
1. It sounds like you have a Form that edits some post. When someone uses the Form on the front-end of the site, you would like to display, somewhere inside the Form, information about the post author (whoever edited the post most recently, or created the post if no edits have been made yet).
2. When the front-end User submits the Form, you would like to store that User as the new, most recent, post author. That new User will overwrite the existing, previous modification post author, so whoever visits the Form next will see the new author's information.
3. I'm not clear about how this is related to or different from the post author in wp-admin. I assume you're talking about the same thing in both places, correct? In other words, you're not trying to store the modification post author information in some custom field value, but maintain the original post author in the actual, standard post author field, correct?
Yes your summary is bang on - I already have the records showing and editable (two forms linked, but that's not relevant). It's a closed system so I can't link it publicly but I can provide you access if you want a look.
I've checked the back end of WP and it's not storing the author there either, which is weird. It was working a few weeks back before updates (I think).
Okay thanks for the clarity. In standard setups, Forms will not modify the post author to be whomever edits the post. Normally that requires some custom programming using one of our APIs called cred_save_data to modify the original post author programmatically. So in general I would not expect the post author to be updated automatically without something like that added to your child theme's functions.php file, or in a new custom code snippet in Toolset > Settings > Custom Code.
You can see an example of this type of code here:
https://toolset.com/forums/topic/change-author-on-form-submission/#post-562725
You would need to adjust the numeric Form ID in that code to match your edit post Form's numeric ID. If you have some similar code on your site that is no longer functioning, I'll need to take a closer look.
To display the current post author inside a Form editor area using simple text, you can insert a Views shortcode inside the Form builder. In the drag-and-drop Form builder, you can use a custom HTML block to insert the Views shortcode. In the Expert mode builder, just paste the shortcode directly into the Form contents somewhere, something like:
Current author: [wpv-post-author]
That will render the current post author name inside the Form editor.
My issue is resolved now. Thank you!