I have the same preset for multiple items … but the listing returns the entire field from grouped. How do I get a duplicate value for items that have the same preset?
$ContentPresetPhone = $this->SettingsCountries->find('list', [
'keyField' => 'preset',
'valueField' => function ($item) {
return $item->get('presetPhone');
},
]);
Result should be:
<select>
<option value="1">+1 - USA</option>
<option value="1">+1 - Virgin Islands</option>
<option value="685">+685 - Western Samoa</option>
<option value="967">+967 - Yemen</option>
</select>
Thank you