• Resolved Furo

    (@furocan)


    Hey!

    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 www.ads-software.com or at Github?

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

    (@fabianlindfors)

    Hi!

    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: https://github.com/advancedforms/advanced-forms/commit/240fc35d23336cddcaccbb4fab5fcd5b6ac14a41.

    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

    (@furocan)

    Thanks for your fast response and fix!

    Do you have any plans when you’re releasing this to www.ads-software.com?
    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

    (@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

    (@furocan)

    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.