Support

Account

Home Forums General Issues Default of _ for space fails with repeater

Solved

Default of _ for space fails with repeater

  • ACF automatically replaces a space in the field label with an “_” when creating the field name. This is acceptable naming as per the notes on the screen.
    The problem I’m having is that not a single field would be recognized when using something as simple as – the_field(). It was impossible to return any values until either the “_” were removed or replace them with a “-” dash.

    Is this something I’m doing incorrectly?

    This was a clean install with:
    localhost (WAMP 2.4)
    WordPress 3.8.1
    Genesis – Version 2.0.2 (Framework)
    Dynamik Gen – Version 1.4.2 (Theme)
    Advanced Custom Fields – Version 4.3.4
    Advanced Custom Fields: Repeater Field – Version 1.1.1
    Custom Post Type UI – Version 0.8.2

  • Hi @Lazy Entrepreneur

    Can you please elaborate more on your issue:
    The problem I’m having is that not a single field would be recognized when using something as simple as – the_field()

    What is the label of the field?
    What is the name of the field?
    What code are you using to get the value?

    Thanks
    E

  • This reply has been marked as private.
  • Hi Elliot

    I saw the ACF GitHUb change you made for the above issue:
    https://github.com/elliotcondon/acf/commit/268b02b45110ba27d1da8cdef296d67d5d96a0b2

    I’ve tested the fix and can confirm that ACF default field names with an “_” work for single fields, repeater fields, and repeater sub fields.

    Thanks for dealing with this so quickly.

    Cheers

Viewing 4 posts - 1 through 4 (of 4 total)

The topic ‘Default of _ for space fails with repeater’ is closed to new replies.