I am building a module that has a nav menu that filters and displays content boxes. The list is built, item by item, in the module admin panel. Each content box is built within the module, and I would like to be able to have a dropdown menu within the content box builder form that is dynamically generated from the list items created previously.
This is what I’ve put together…didn’t work. Am I moving in the right direction and just have syntax errors or is this completely wrong?
'general' => array( 'title' => '', 'fields' => array( 'partner_type' => array( 'type' => 'select', 'label' => __( 'Select Partner Type', 'fl-builder' ), 'default' => '', 'options' => array( for ( $i = 0; $i < count( $settings->nav_list_items); $i++) : if (empty( $settings->nav_list_items[ $i ] ) ) continue; echo $settings->nav_list_items[ $i ] => __( $settings->nav_list_items[ $i ], 'fl-builder' ), endfor; ) ) ),