<?php
header('Content-type: text/html; charset=ISO-8859-1');

$tabela = ($Campo->EFC_IDTABELA > 0) ? $Campo->EFC_IDTABELA : $tabela;
$index = ($Campo->EFC_CODIGO > 0) ? $Campo->EFC_CODIGO : rand();
?>

<div class="campo div-fields-esp esp-box">
    <input name="tabelas[<?php echo $tabela; ?>][campos][<?php echo $index; ?>][EFC_CODIGO]" type="hidden" value="<?php echo $Campo->EFC_CODIGO ?>" />
    <input name="tabelas[<?php echo $tabela; ?>][campos][<?php echo $index; ?>][EFC_IDTABELA]" type="hidden" value="<?php echo $Campo->EFC_IDTABELA ?>" />
    <a href="javascript:void(0);" class="excluir-campo link-excluir-item"><i class="fa fa-times"></i></a>
    <div class="row-4">
        <label for="EFC_NOMECAMPO_<?php echo $index; ?>">Nome do campo <span class="required">*</span></label>
        <input id="EFC_NOMECAMPO_<?php echo $index; ?>" name="tabelas[<?php echo $tabela; ?>][campos][<?php echo $index; ?>][EFC_NOMECAMPO]" class="validate[required]" type="text" value="<?php echo $Campo->EFC_NOMECAMPO; ?>" />
    </div><!-- row -->
    <div class="row-4">
        <label for="EFC_TIPODADO_<?php echo $index; ?>">Tipo de dado <span class="required">*</span></label>
        <input id="EFC_TIPODADO_<?php echo $index; ?>" name="tabelas[<?php echo $tabela; ?>][campos][<?php echo $index; ?>][EFC_TIPODADO]" class="validate[required]" type="text" value="<?php echo $Campo->EFC_TIPODADO; ?>" />
    </div><!-- row -->
    <div class="row-4">
        <label for="EFC_TAMANHO_<?php echo $index; ?>">Tamanho <span class="required">*</span></label>
        <input id="EFC_TAMANHO_<?php echo $index; ?>" name="tabelas[<?php echo $tabela; ?>][campos][<?php echo $index; ?>][EFC_TAMANHO]" class="validate[required]" type="text" value="<?php echo $Campo->EFC_TAMANHO; ?>" />
    </div><!-- row -->
    <div class="row-4">
        <label for="EFC_DESCRICAOCAMPO_<?php echo $index; ?>">Descrição do campo <span class="required">*</span></label>
        <input id="EFC_DESCRICAOCAMPO_<?php echo $index; ?>" name="tabelas[<?php echo $tabela; ?>][campos][<?php echo $index; ?>][EFC_DESCRICAOCAMPO]" class="validate[required]" type="text" value="<?php echo $Campo->EFC_DESCRICAOCAMPO; ?>" />
    </div><!-- row -->
</div>