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.
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:
Expected behavior
I expect the hidden field title to carry through to the post.
Version Information:
Additional context
I realize this isn't standard functionality but it's a method devs have used.