/** * Returns an HTML options list of only email elements * * @param array $config The form config * @param int $selected Selected element ID */ function iphorm_email_elements_as_options($config, $selected) { $xhtml = ''; foreach ($config['elements'] as $element) { if ($element['type'] == 'email') { $xhtml .= '<option value="' . $element['id'] . '" ' . selected($element['id'], $selected, false) . '>' . iphorm_get_element_admin_label($element) . '</option>'; } } return $xhtml; }
<?php if (count($columns)) { ?> <table class="iphorm-entry-table iphorm-entry-table-left"> <?php foreach ($columns as $key => $element) { ?> <?php if (property_exists($entry, $key)) { $value = $entry->{$key}; $isEmpty = $value === '' || $value === null; if (!$isEmpty || $isEmpty && $showEmptyFields) { ?> <tr> <th><?php echo esc_html(iphorm_get_element_admin_label($element)); ?> </th> <td><?php echo $entry->{$key}; ?> </td> </tr> <?php } ?> <?php } elseif ($element['type'] == 'html') { ?> <tr> <td colspan="2"><?php