Mauricio, I’m not sure if you just added this line after this?
// store form data
$raw_data = $_POST['profilepic_displayoptions'];
$reversed_data = array();
foreach ($raw_data as $key => $val) {
$reversed_data[$val] = $key;
}
Can you be more specific? I tried adding what you said and it was actually more problematic.