Support

Account

Home Forums ACF PRO Unable to create field names with field_ in the name

Helping

Unable to create field names with field_ in the name

  • Hey Elliot, after a frustrating hour, I managed to find an annoying bug / quirk in ACF5 Pro.

    In the function – acf_is_field_key( $field_key = ” ) (in api-field)

    ‘if( substr($field_key, 0, 6) === ‘field_’ ) {‘

    I named my field “field_definitions” so it assumed it was a field key and returned true, and couldn’t find the field as a result.

    Is it possible to prevent people from naming their fields as field_ to avoid this issue?

    Thanks,
    Phill

  • Hi @Phillip

    That’s a really good point. Yes, I’ll add in some JS to prevent this when creating a field.

    Thanks mate.

    Cheers
    E

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

The topic ‘Unable to create field names with field_ in the name’ is closed to new replies.