<?php 
    $uform = UserForm::objects()->all();
    $ftypes = FormField::allTypes();
    foreach ($uform[0]->getFields() as $f) {
        if ($f->get('private')) {
            continue;
        }
        ?>
        <tr>
            <td></td>
            <td><?php 
        echo $f->get('label');
        ?>
</td>
            <td><?php 
        $t = FormField::getFieldType($f->get('type'));
        echo __($t[0]);
        ?>
</td>
            <td><?php 
        $rmode = $f->getRequirementMode();
        $modes = $f->getAllRequirementModes();
        echo $modes[$rmode]['desc'];
        ?>
</td>
            <td><?php 
        echo $f->get('name');
        ?>
</td>
            <td><input type="checkbox" disabled="disabled"/></td></tr>
            <th><?php echo __('Visibility'); ?></th>
            <th><?php echo __('Variable'); ?></th>
            <th><?php echo __('Delete'); ?></th>
        </tr>
    </thead>
    <tbody>
    <?php
        $uform = UserForm::objects()->all();
        $ftypes = FormField::allTypes();
        foreach ($uform[0]->getFields() as $f) {
            if ($f->get('private')) continue;
        ?>
        <tr>
            <td></td>
            <td><?php echo $f->get('label'); ?></td>
            <td><?php $t=FormField::getFieldType($f->get('type')); echo __($t[0]); ?></td>
            <td><?php
                $rmode = $f->getRequirementMode();
                $modes = $f->getAllRequirementModes();
                echo $modes[$rmode]['desc'];
            ?></td>
            <td><?php echo $f->get('name'); ?></td>
            <td><input type="checkbox" disabled="disabled"/></td></tr>

        <?php } ?>
    </tbody>
    <?php } # form->type == 'T' ?>
    <thead>
        <tr>
            <th colspan="7">
                <em><strong><?php echo __('Form Fields'); ?></strong>