Home Forums Front-end Issues acf_form() Post Title


acf_form() Post Title

  • I am using the acf_form() function to display a form on a page. I am using “title=true” to include the post_title in the form.

    Is there any way to change the “Title” text for the form element label? I want it to say “Customer Name” instead.

  • Yes you can do something like this:

    function my_acf_prepare_field($field) {
    	$field['label'] = 'Customer Name';
           return $field;
    add_filter('acf/prepare_field/name=_post_title', 'my_acf_prepare_field');
Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.

We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Cookie Policy. If you continue to use this site, you consent to our use of cookies.