Support

Account

Home Forums ACF PRO Radio buttons with attached rows of data

Unread

Radio buttons with attached rows of data

  • Hey all,

    Right now i have a front end form with a lot of radio buttons. I want to generate a list of components based on the choices made in the form (in a multidimensional Array i imagine).

    So for example if i have a field group containing two radio button options:

    – First option
    – Second option

    Then “First option” will push a set of components (including qty, sku and component name) to the list of components (the array):

    QTY | SKU | COMPONENT_NAME
     5     1     Component 1
     2     2     Component 2

    So the component list array looks like this and is saved to the post:

    Array
    (
        [0] => Array
            (
                [QTY] => 5
                [SKU] => 1
                [COMPONENT_NAME] => Component name
            )
    
        [1] => Array
            (
                [QTY] => 2
                [SKU] => 2
                [COMPONENT_NAME] => Component name
            )
    )

    So my question is – is it somehow possible to attach such components to a radio button choice? Or do you have any suggestions to how i can achieve it? 🙂

Viewing 1 post (of 1 total)

The topic ‘Radio buttons with attached rows of data’ is closed to new replies.