<?php foreach ($fields as $id => $displayName) { $customField = new MM_CustomField($id); $value = $user->getCustomDataByFieldId($id)->getValue(); if ($customField->isValid()) { ?> <tr> <td> <span class="mm-myaccount-dialog-label"><?php echo $customField->getDisplayName(); ?> </span> </td> <td> <?php $class = "mm-myaccount-field-" . $customField->getType(); echo $customField->draw($value, $class, "mm_custom_"); ?> </td> </tr> <?php } } ?> </table> <?php } ?> </div> <div class="mm-dialog-footer-container">
onchange="mmjs.showOnMyAccountChanged()" /> Show on My Account Page </label> <input type='hidden' id='mm-show-on-my-account' value='<?php echo $customField->showOnMyAccount() ? "1" : "0"; ?> ' /> </td> </tr> <tr> <td>Type</td> <td> <select id="mm-field-type" onchange="mmjs.typeChangeHandler()"> <?php echo MM_HtmlUtils::getCustomFieldTypeList($customField->getType()); ?> </select> </td> </tr> <tr> <td></td> <td> <div id="field-options-container" style="display:none;"> Options <div id="mm-field-options" style="margin-top:5px;"> <?php $options = $customField->getOptions(); if (count($options) > 0) { $crntOption = 1;
<?php foreach ($fields as $field) { $crntField = new MM_CustomField($field->id); if ($crntField->isValid()) { ?> <tr> <td width="120px"> <span style="margin-right:15px;"><?php echo $field->display_name; ?> </span> </td> <td> <?php $class = ""; switch ($crntField->getType()) { case MM_CustomField::$TYPE_INPUT: case MM_CustomField::$TYPE_DROPDOWN: $class = "mm-short-text-field"; break; case MM_CustomField::$TYPE_TEXT: $class = "mm-long-text-field"; break; case MM_CustomField::$TYPE_RADIO: $class = "mm-radio-button"; break; } echo $crntField->draw($field->value, $class, "mm_custom_field_", false, true); ?> </td> </tr>