Multiple instances of checkbox lists
-
Hi all,
I want to create multiple instances of checkbox lists. In other words, I want to be able to check multiple boxes in different groups. This is the code structure I’m using:
array( 'name' => __( 'Genres', 'your-prefix' ), 'id' => "{$prefix}checkbox_list", 'type' => 'checkbox_list',
I thought I would be able to create several checkbox lists by giving each array a unique id, but changing the id makes the script stop working. To retrieve the values of a checkbox list I use:
$plots = rwmb_meta( 'your_prefix_checkbox_list', 'type=checkbox_list' ); echo implode( ', ', $plots );
Even setting the id and ‘your_prefix_checkbox_list’ to the exact same unique variable doesn’t work. What am I doing wrong?
Many thanks in advance!
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Multiple instances of checkbox lists’ is closed to new replies.