Home Forums Front-end Issues Taxonomy IDs in forms


Taxonomy IDs in forms

  • Hi

    I’m having some trouble with the CSS ID on taxonomies for select boxes.

    I have a form with a number of select boxes, most of which are relationships but with one as a taxonomy.

    The relationship select boxes all receive a CSS ID in the form of

    <select id="acf-field-climbing_centre" class="post_object" name="fields[field_5298b914ea407]">

    however, taxonomy fields look like this:

    <select name="fields[field_52e7f08dec08a]">

    …they’re missing the ID that’s assigned to other fields.

    Anyone have any idea why this might be the case? I need these IDs as I’m using them to pre-populate fields using JS.

  • Hi @shankie,

    Looks like the taxonomy select field does not echo an ID, I have raised an issue with Elliot.

    In the mean time, can you update your jQuery selector to target the name? Eg:


    I am using the contains word selector here =>

  • Hi @acf-support,

    Thanks for the tips. That’s grand, I’ll try using the name tomorrow. It should solve the problem.

    In a way, glad to know that it wasn’t just me being careless.

    Thanks for your help.


  • Hi @shankie

    Thanks for the report. I’ll add this to the to-do and fix the missing attributes.


  • Hi @shankie

    Thanks for the request. This has been pushed to github and will be released soon.


  • Hi @elliot,

    That’s great—–thanks for sorting out.



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

The topic ‘Taxonomy IDs in forms’ is closed to new replies.