Hi there
I need a way to add multiple values with one label for a checkbox.
Basically the frontend checkboxes will show 2 options, worldwide or Europe.
If the select Europe an array of all country code for Europe will be present.
So in the ACF admin I want to do the following or similar…
“ad”, “ae”, “af”, “ag”, “ai”, “al”, “am”,… : Europe
So multiple values with a single choice.
Is this possible? I can’t seem to get this to work.
Thanks
Don’t worry, I sorted it using str_split.
So I entered adaeafagaialam : Europe
Then split the string to create a new array called – $rmcwordwidearray
Then requested that the split be every 2 characters which then gives me the country code.
$rmcwordwide = get_field('rights_management_control_by_europe', $post->ID);
$rmcwordwidearray = str_split($rmcwordwide,2);
It would be nice if ACF could allow separation by pipe or semicolon which then splits and turns them into an array.
I’m happy 🙂