You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Defining post_title in hidden frontend form no longer possible #1019
Describe the bug
I had a frontend form with a default post_title defined in a hidden form field added like so: 'html_before_fields' => '<input type="hidden" id="acf-_post_title" name="acf[_post_title]" value="Default Title">'. Submissions now have "(no title)" because line 278 of form-front.php requires the post_title argument to be true.
To Reproduce
Steps to reproduce the behavior:
Create a frontend form using acf_form() that creates a new post, and make sure post_title is set to the default of false and you have added a hidden post_title field as described above.
Submit the form
Observe that the new post's title is "(no title)" rather than the one you defined in your hidden field.
Expected behavior
I expect the hidden field title to carry through to the post.
Version Information:
WordPress Version [7.0]
PHP Version [8.2]
ACF Version [ACF PRO 6.8.4]
Browser [Chromium 149.0.7827.196 ]
Additional context
I realize this isn't standard functionality but it's a method devs have used.
I'm not on the ACF team, just a volunteer looking through issues, but I dug into this and I think the change is intended.
From 6.8.2, frontend forms only save the post title and content when the form has post_title or post_content set to true. The changelog lists it as a security fix. Before that, a submitted _post_title value was saved even when the form had the title turned off. Since a hidden input is sent by the browser, anyone could change its value, so I guess that is why it was closed off.
One way that should still work is setting the default title through the new_post argument. Those values come from the signed form data on the server, so the browser can't change them:
If the title needs to be built from other data, the acf/pre_save_post filter (priority above 5) or WordPress's wp_insert_post_data filter should also work.
Hope this helps. If the maintainers agree it is working as intended, maybe this one can be closed.
Activity
faisalahammad commentedon Oct 12, 2026
Hi,
I'm not on the ACF team, just a volunteer looking through issues, but I dug into this and I think the change is intended.
From 6.8.2, frontend forms only save the post title and content when the form has
post_titleorpost_contentset totrue. The changelog lists it as a security fix. Before that, a submitted_post_titlevalue was saved even when the form had the title turned off. Since a hidden input is sent by the browser, anyone could change its value, so I guess that is why it was closed off.One way that should still work is setting the default title through the
new_postargument. Those values come from the signed form data on the server, so the browser can't change them:If the title needs to be built from other data, the
acf/pre_save_postfilter (priority above 5) or WordPress'swp_insert_post_datafilter should also work.Hope this helps. If the maintainers agree it is working as intended, maybe this one can be closed.