$gameObj->select($gameID); $mainGameOptions[$gameID] = $gameObj->get_info_filtered("name"); $gamesPlayedOptions["game_" . $gameID] = array("type" => "checkbox", "sortorder" => $i++, "attributes" => array("class" => "textBox formInput", "style" => "margin-left: 10px"), "value" => $member->playsGame($gameID), "options" => array("1" => $gameObj->get_info_filtered("name"))); } $mainGamePlayed['maingame']['options'] = $mainGameOptions; $arrComponents = array_merge($arrComponents, $arrSocialMediaComponents, $arrBirthdayComponents, $gamesPlayedSection, $mainGamePlayed, $gamesPlayedOptions); } // Set up Custom Profile Options $customCount = 1; $arrCustomOptions = array(); $result = $mysqli->query("SELECT * FROM " . $dbprefix . "profilecategory ORDER BY ordernum DESC"); while ($row = $result->fetch_assoc()) { $profileCategoryObj->select($row['profilecategory_id']); $arrProfileOptions = $profileCategoryObj->getAssociateIDs("ORDER BY sortnum"); $arrCustomOptions['customsection_' . $customCount] = array("type" => "section", "options" => array("section_title" => $profileCategoryObj->get_info_filtered("name") . ":"), "sortorder" => $i++); $customCount++; foreach ($arrProfileOptions as $profileOptionID) { $profileOptionObj->select($profileOptionID); $profileOptionValue = $member->getProfileValue($profileOptionID, true); $arrSelectOptions = array(); if ($profileOptionObj->isSelectOption()) { $arrSelectOptions = $profileOptionObj->getSelectValues(); $inputType = "select"; } else { $inputType = "text"; } $arrCustomOptions["custom_" . $profileOptionID] = array("display_name" => $profileOptionObj->get_info_filtered("name"), "type" => $inputType, "attributes" => array("class" => "textBox formInput"), "sortorder" => $i++, "options" => $arrSelectOptions, "value" => $profileOptionValue); } } $arrComponents = array_merge($arrComponents, $arrCustomOptions); $setupFormArgs = array("name" => "console-" . $cID, "components" => $arrComponents, "saveObject" => $member, "saveType" => "update", "afterSave" => array("saveCustomValues"), "saveMessage" => "Successfully Saved Profile Information!", "attributes" => array("action" => $MAIN_ROOT . "members/console.php?cID=" . $cID, "method" => "post"), "description" => "Use the form below to edit your profile.");