?>
');"><?php 
        echo MM_Utils::getIcon('trash-o', 'red', '1.2em', '1px');
        ?>
</a>
	<?php 
    }
    ?>
	</div>
<?php 
}
$doRenderForm = true;
$initialCreation = true;
$customField = new MM_CustomField($p->id);
// create custom field if it doesn't exist
if (!$customField->isValid()) {
    $customField = new MM_CustomField();
    $customField->setDisplayName("Untitled");
    $result = $customField->commitData();
    if (MM_Response::isSuccess($result)) {
        $customField = new MM_CustomField($customField->getId());
    } else {
        $doRenderForm = false;
    }
} else {
    $initialCreation = false;
}
if ($doRenderForm) {
    $showOnMyAccountChecked = $customField->showOnMyAccount() == true ? "checked" : "";
    ?>
	<div id="mm-form-container">
            $fields = MM_CustomField::getCustomFieldDataByUser($user->getId());
            ?>
<style>
	.mm-short-text-field { width: 250px; }
	.mm-long-text-field { width:400px; height:75px; }
	.mm-radio-button { display:block; clear:both; }
</style>
<form name='mm_custom_post' method='post'>
<div id="mm-form-container">
	
	<div style='margin-top:10px;'>
		<table cellspacing="8">
		<?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";