Support

Account

Home Forums General Issues Getting Subfield value from a Key, is it possible?

Helping

Getting Subfield value from a Key, is it possible?

  • I’ve been trying to determine if a conditional field should be displayed through php.

    Largely this is working fine as the conditional_logic in the field gives the field key.

    I am able to use a get_field with the field key to get the value and compare it successfully most of the time.
    But if i try a get_field thats in a group with a key it just comes back blank.

    Is there a way to get the value of a subfield with its key?

  • If you haven’t figured this out.

    No, you cannot get a sub field using use the key. When it comes to sub fields you must use a have_rows() loop and the field name in the loop.

    With a group field you can use "{$parent_name}_{$subfield_name}"

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

You must be logged in to reply to this topic.