Support

Account

Home Forums Add-ons Flexible Content Field Multiple choice inside a multiple choice

Helping

Multiple choice inside a multiple choice

  • Hi ACF peoples,

    I’m new(ish) to ACF and my PHP skills are limited. I’ve done a lot of reading and tried a bunch of things, but as I have a limited amount of hair left to pull out, I’m reaching out, hoping some kind soul can help a noob out.

    I have a page I’m wanting to fill with (I’m calling them) bricks.

    1) You first choose if the brick is to be text or an image.
    2) Then you choose which ratio you want the brick to be (portrait, landscape or square).
    3) And from there you can either enter your text or upload an image.

    And this is the field name/type structure:

    brick_type (flexible content)
    —— brick_type_image (layout)
    —————— image_ratio (flexible content)
    —————————— image_portrait (layout)
    —————————————— image_portrait_url (image)
    —————————— image_landscape (layout)
    —————————————— image_landscape_url (image)
    —————————— image_square (layout)
    —————————————— image_square_url (image)
    —— brick_type_text (layout)
    —————— text_ratio (flexible content)
    —————————— text_portrait (layout)
    —————————————— text_portrait_txt (text)
    —————————— text_landscape (layout)
    —————————————— text_landscape_txt (text)
    —————————— text_square (layout)
    —————————————— text_square_txt (text)

    I hope that makes sense. I’ve tried to follow the examples on the Flexible Content documentation page, with no luck.

    I do have (almost) the exact same layout the the large image at the top of the page, where the user can choose between an image or a video. That works fine, after a little trial and error. But with this, I’m getting no output at all. If the generated code was all messed up, I could at least see the code to see where it was going wrong.

    I hope this is enough to go on.

    Many thanks in advance for anyone who is kind enough to help.

  • Hi @nickverburgt

    Depending on the selected layout, you should be able to get the selected value as shown in the documentation. Be sure to check that the global post ID in use is correct.

    If all that is correct, do share with us some sample code of how you are getting the values so that we may be able to assist further.

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

The topic ‘Multiple choice inside a multiple choice’ is closed to new replies.