function custom_changes_civicrm_buildForm($formName, &$form) {
if ($formName == 'CRM_Member_Form_Membership'){
foreach($form->_elements as $key => $value){
if ($key == 4){
$assoc_array = $value->_options[1][67];
ksort($assoc_array,SORT_NUMERIC);
unset($form->_elements[$key]->_options[1][67]);
$form->_elements[$key]->_options[1][67] = $assoc_array;
}
}
I want to alter the options order by using ksort, but I dont find any function to alter the elements like setLabel which sets label
Which is the function for altering and changing options in an element?