Created
May 15, 2019 14:56
-
-
Save dstogov/52a44c1ad3955ef5edbbc490f16a0e75 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function form_process_radios($element) { | |
$weight = 0; | |
foreach ($element['#options'] as $key => $choice) { | |
$weight += 0.001; | |
$element += array($key => array()); | |
$element[$key] += array( | |
'#type' => 'radio', | |
'#weight' => $weight, | |
); | |
} | |
return $element; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment