Support » Plugin: Advanced Forms for ACF » af/field/before_render – Documentation is misleading

  • Resolved Furo



    In the documentation is an example how to use the filter af/field/before_render.

    function modify_field( $field, $form, $args ) {
        $field['label'] = 'New field label';
        return $field;

    I think that’s misleading, I thought I can change the label of the field.
    But that’s not possible, because the filter is called after the label is printed.
    See form-rendering.php:
    At line 470 is the print function for the label.
    At line 480 the filters were called.

    I need to change label for a single field. Is this possible in anyway?

    Besides the documentation for the “before_render” filter is still wrong as I mentioned here.

    And another question: Do you prefer reporting issues like that here at or at Github?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author fabianlindfors



    You’re totally right, the filter is applied way too late. I took the opportunity to fix this and the patch is available if you install from Github:

    Regarding issues I prefer to have them raised here on the forum. This is where most people come looking for answers when they run into problems.

    Thanks a lot for pointing this out! 🙂

    Thread Starter Furo


    Thanks for your fast response and fix!

    Do you have any plans when you’re releasing this to
    We’re using Composer and get the plugin via wpackagist.

    Meanwhile I can try to switch the source to the Github repo or overwrite the fix manually, so no pressure! But it would good to know when we can go back to our normal process.

    Keep up your great work! 🙂

    Plugin Author fabianlindfors


    Unfortunately I can’t answer that right now. I mostly release when there is enough material for one or to fix a significant bug. Overwriting the issue manually would probably be the best, this is guaranteed to be in the next release 🙂

    Thread Starter Furo


    Okay, thanks, then I’ll overwrite it manually and I looking forward to the next release 🙂

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘af/field/before_render – Documentation is misleading’ is closed to new replies.