Support

Account

Home Forums Bug Reports findFields()[0] and getField(key) not returning the same item

Helping

findFields()[0] and getField(key) not returning the same item

  • var fn = acf.findFields({key:'field_633dabc3c27a4'}); // or getFields({key:'field_633dabc3c27a4'});
    var fk = acf.getField('field_633dabc3c27a4');
    console.log(fn[0]);
    console.log(fk);

    Should return the same object, surely?

    Why does getField return a valid jQuery object and findFields()[0] just return a DOM element, to which nothing can be done?

    I suspect this is a bug.

  • I don’t have an answer for you.

    Have you tried console.log(fn) to see how the entire thing is returned?

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

You must be logged in to reply to this topic.