本文整理匯總了PHP中GFCommon::is_section_empty方法的典型用法代碼示例。如果您正苦於以下問題:PHP GFCommon::is_section_empty方法的具體用法?PHP GFCommon::is_section_empty怎麽用?PHP GFCommon::is_section_empty使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類GFCommon
的用法示例。
在下文中一共展示了GFCommon::is_section_empty方法的8個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: lead_detail_grid
public static function lead_detail_grid($form, $lead, $allow_display_empty_fields = false)
{
$form_id = absint($form['id']);
$display_empty_fields = false;
if ($allow_display_empty_fields) {
$display_empty_fields = rgget('gf_display_empty_fields', $_COOKIE);
}
$display_empty_fields = apply_filters('gform_entry_detail_grid_display_empty_fields', $display_empty_fields, $form, $lead);
?>
<table cellspacing="0" class="widefat fixed entry-detail-view">
<thead>
<tr>
<th id="details">
<?php
$title = sprintf('%s : %s %s', esc_html($form['title']), esc_html__('Entry # ', 'gravityforms'), absint($lead['id']));
echo apply_filters('gravityflow_title_entry_detail', $title, $form, $lead);
?>
</th>
<th style="width:140px; font-size:10px; text-align: right;">
<?php
if ($allow_display_empty_fields) {
?>
<input type="checkbox" id="gentry_display_empty_fields" <?php
echo $display_empty_fields ? "checked='checked'" : '';
?>
onclick="ToggleShowEmptyFields();" />
<label for="gentry_display_empty_fields"><?php
esc_html_e('show empty fields', 'gravityforms');
?>
</label>
<?php
}
?>
</th>
</tr>
</thead>
<tbody>
<?php
$count = 0;
$field_count = sizeof($form['fields']);
$has_product_fields = false;
foreach ($form['fields'] as $field) {
switch (RGFormsModel::get_input_type($field)) {
case 'section':
if (!GFCommon::is_section_empty($field, $form, $lead) || $display_empty_fields) {
$count++;
$is_last = $count >= $field_count ? true : false;
?>
<tr>
<td colspan="2" class="entry-view-section-break<?php
echo $is_last ? ' lastrow' : '';
?>
"><?php
echo esc_html(GFCommon::get_label($field));
?>
</td>
</tr>
<?php
}
break;
case 'captcha':
case 'html':
case 'password':
case 'page':
//ignore captcha, html, password, page field
break;
default:
//ignore product fields as they will be grouped together at the end of the grid
if (GFCommon::is_product_field($field->type)) {
$has_product_fields = true;
continue;
}
$value = RGFormsModel::get_lead_field_value($lead, $field);
$display_value = GFCommon::get_lead_field_display($field, $value, $lead['currency']);
$display_value = apply_filters('gform_entry_field_value', $display_value, $field, $lead, $form);
if ($display_empty_fields || !empty($display_value) || $display_value === '0') {
$count++;
$is_last = $count >= $field_count && !$has_product_fields ? true : false;
$last_row = $is_last ? ' lastrow' : '';
$display_value = empty($display_value) && $display_value !== '0' ? ' ' : $display_value;
$content = '
<tr>
<td colspan="2" class="entry-view-field-name">' . esc_html(GFCommon::get_label($field)) . '</td>
</tr>
<tr>
<td colspan="2" class="entry-view-field-value' . $last_row . '">' . $display_value . '</td>
</tr>';
$content = apply_filters('gform_field_content', $content, $field, $value, $lead['id'], $form['id']);
echo $content;
}
break;
}
}
$products = array();
if ($has_product_fields) {
$products = GFCommon::get_product_fields($form, $lead);
if (!empty($products['products'])) {
?>
<tr>
<td colspan="2" class="entry-view-field-name"><?php
//.........這裏部分代碼省略.........
示例2: get_submitted_fields
public static function get_submitted_fields($form, $lead, $display_empty = false, $use_text = false, $format = "html", $use_admin_label = false, $merge_tag = "", $options = "")
{
$field_data = "";
if ($format == "html") {
$field_data = '<table width="99%" border="0" cellpadding="1" cellspacing="0" bgcolor="#EAEAEA"><tr><td>
<table width="100%" border="0" cellpadding="5" cellspacing="0" bgcolor="#FFFFFF">';
}
$options_array = explode(",", $options);
$no_admin = in_array("noadmin", $options_array);
$no_hidden = in_array("nohidden", $options_array);
$has_product_fields = false;
foreach ($form["fields"] as $field) {
$field_value = "";
$field_label = $use_admin_label && !rgempty("adminLabel", $field) ? rgar($field, "adminLabel") : esc_html(GFCommon::get_label($field));
switch ($field["type"]) {
case "captcha":
break;
case "section":
if (!GFCommon::is_section_empty($field, $form, $lead) || $display_empty) {
switch ($format) {
case "text":
$field_value = "--------------------------------\n{$field_label}\n\n";
break;
default:
$field_value = sprintf('<tr>
<td colspan="2" style="font-size:14px; font-weight:bold; background-color:#EEE; border-bottom:1px solid #DFDFDF; padding:7px 7px">%s</td>
</tr>', $field_label);
break;
}
}
$field_value = apply_filters("gform_merge_tag_filter", $field_value, $merge_tag, $options, $field, $field_label);
$field_data .= $field_value;
break;
case "password":
//ignore password fields
break;
default:
//ignore product fields as they will be grouped together at the end of the grid
if (self::is_product_field($field["type"])) {
$has_product_fields = true;
continue;
} else {
if (RGFormsModel::is_field_hidden($form, $field, array(), $lead)) {
//ignore fields hidden by conditional logic
continue;
}
}
$raw_field_value = RGFormsModel::get_lead_field_value($lead, $field);
$field_value = GFCommon::get_lead_field_display($field, $raw_field_value, rgar($lead, "currency"), $use_text, $format, "email");
$display_field = true;
//depending on parameters, don't display adminOnly or hidden fields
if ($no_admin && rgar($field, "adminOnly")) {
$display_field = false;
} else {
if ($no_hidden && RGFormsModel::get_input_type($field) == "hidden") {
$display_field = false;
}
}
//if field is not supposed to be displayed, pass false to filter. otherwise, pass field's value
if (!$display_field) {
$field_value = false;
}
$field_value = apply_filters("gform_merge_tag_filter", $field_value, $merge_tag, $options, $field, $raw_field_value);
if ($field_value === false) {
continue;
}
if (!empty($field_value) || strlen($field_value) > 0 || $display_empty) {
switch ($format) {
case "text":
$field_data .= "{$field_label}: {$field_value}\n\n";
break;
default:
$field_data .= sprintf('<tr bgcolor="#EAF2FA">
<td colspan="2">
<font style="font-family: sans-serif; font-size:12px;"><strong>%s</strong></font>
</td>
</tr>
<tr bgcolor="#FFFFFF">
<td width="20"> </td>
<td>
<font style="font-family: sans-serif; font-size:12px;">%s</font>
</td>
</tr>', $field_label, empty($field_value) && strlen($field_value) == 0 ? " " : $field_value);
break;
}
}
}
}
if ($has_product_fields) {
$field_data .= self::get_submitted_pricing_fields($form, $lead, $format, $use_text, $use_admin_label);
}
if ($format == "html") {
$field_data .= '</table>
</td>
</tr>
</table>';
}
return $field_data;
}
示例3: lead_detail_grid
public static function lead_detail_grid($form, $lead, $allow_display_empty_fields = false)
{
$form_id = $form["id"];
$display_empty_fields = false;
if ($allow_display_empty_fields) {
$display_empty_fields = rgget("gf_display_empty_fields", $_COOKIE);
}
?>
<table cellspacing="0" class="widefat fixed entry-detail-view">
<thead>
<tr>
<th id="details">
<?php
echo $form["title"];
?>
: <?php
_e("Entry # ", "gravityforms");
?>
<?php
echo $lead["id"];
?>
</th>
<th style="width:140px; font-size:10px; text-align: right;">
<?php
if ($allow_display_empty_fields) {
?>
<input type="checkbox" id="gentry_display_empty_fields" <?php
echo $display_empty_fields ? "checked='checked'" : "";
?>
onclick="ToggleShowEmptyFields();"/> <label for="gentry_display_empty_fields"><?php
_e("show empty fields", "gravityforms");
?>
</label>
<?php
}
?>
</th>
</tr>
</thead>
<tbody>
<?php
$count = 0;
$field_count = sizeof($form["fields"]);
$has_product_fields = false;
foreach ($form["fields"] as $field) {
switch (RGFormsModel::get_input_type($field)) {
case "section":
if (!GFCommon::is_section_empty($field, $form, $lead) || $display_empty_fields) {
$count++;
$is_last = $count >= $field_count ? true : false;
?>
<tr>
<td colspan="2" class="entry-view-section-break<?php
echo $is_last ? " lastrow" : "";
?>
"><?php
echo esc_html(GFCommon::get_label($field));
?>
</td>
</tr>
<?php
}
break;
case "captcha":
case "html":
case "password":
case "page":
//ignore captcha, html, password, page field
break;
default:
//ignore product fields as they will be grouped together at the end of the grid
if (GFCommon::is_product_field($field["type"])) {
$has_product_fields = true;
continue;
}
$value = RGFormsModel::get_lead_field_value($lead, $field);
$display_value = GFCommon::get_lead_field_display($field, $value, $lead["currency"]);
$display_value = apply_filters("gform_entry_field_value", $display_value, $field, $lead, $form);
if ($display_empty_fields || !empty($display_value) || $display_value === "0") {
$count++;
$is_last = $count >= $field_count && !$has_product_fields ? true : false;
$last_row = $is_last ? " lastrow" : "";
$display_value = empty($display_value) && $display_value !== "0" ? " " : $display_value;
$content = '
<tr>
<td colspan="2" class="entry-view-field-name">' . esc_html(GFCommon::get_label($field)) . '</td>
</tr>
<tr>
<td colspan="2" class="entry-view-field-value' . $last_row . '">' . $display_value . '</td>
</tr>';
$content = apply_filters("gform_field_content", $content, $field, $value, $lead["id"], $form["id"]);
echo $content;
}
break;
}
}
$products = array();
if ($has_product_fields) {
$products = GFCommon::get_product_fields($form, $lead);
if (!empty($products["products"])) {
//.........這裏部分代碼省略.........
示例4: get_submitted_fields
public static function get_submitted_fields($form, $lead, $display_empty = false, $use_text = false, $format = 'html', $use_admin_label = false, $merge_tag = '', $options = '')
{
$field_data = '';
if ($format == 'html') {
$field_data = '<table width="99%" border="0" cellpadding="1" cellspacing="0" bgcolor="#EAEAEA"><tr><td>
<table width="100%" border="0" cellpadding="5" cellspacing="0" bgcolor="#FFFFFF">
';
}
$options_array = explode(',', $options);
$no_admin = in_array('noadmin', $options_array);
$no_hidden = in_array('nohidden', $options_array);
$display_product_summary = false;
foreach ($form['fields'] as $field) {
$field_value = '';
$field_label = $use_admin_label && !empty($field->adminLabel) ? $field->adminLabel : esc_html(GFCommon::get_label($field, 0, false, $use_admin_label));
switch ($field->type) {
case 'captcha':
break;
case 'section':
if (GFFormsModel::is_field_hidden($form, $field, array(), $lead)) {
continue;
}
if ((!GFCommon::is_section_empty($field, $form, $lead) || $display_empty) && !$field->adminOnly) {
switch ($format) {
case 'text':
$field_value = "--------------------------------\n{$field_label}\n\n";
break;
default:
$field_value = sprintf('<tr>
<td colspan="2" style="font-size:14px; font-weight:bold; background-color:#EEE; border-bottom:1px solid #DFDFDF; padding:7px 7px">%s</td>
</tr>
', $field_label);
break;
}
}
$field_value = apply_filters('gform_merge_tag_filter', $field_value, $merge_tag, $options, $field, $field_label);
$field_data .= $field_value;
break;
case 'password':
//ignore password fields
break;
default:
if (self::is_product_field($field->type)) {
// ignore product fields as they will be grouped together at the end of the grid
$display_product_summary = apply_filters('gform_display_product_summary', true, $field, $form, $lead);
if ($display_product_summary) {
continue;
}
} else {
if (GFFormsModel::is_field_hidden($form, $field, array(), $lead)) {
// ignore fields hidden by conditional logic
continue;
}
}
$raw_field_value = RGFormsModel::get_lead_field_value($lead, $field);
$field_value = GFCommon::get_lead_field_display($field, $raw_field_value, rgar($lead, 'currency'), $use_text, $format, 'email');
$display_field = true;
//depending on parameters, don't display adminOnly or hidden fields
if ($no_admin && $field->adminOnly) {
$display_field = false;
} else {
if ($no_hidden && RGFormsModel::get_input_type($field) == 'hidden') {
$display_field = false;
}
}
//if field is not supposed to be displayed, pass false to filter. otherwise, pass field's value
if (!$display_field) {
$field_value = false;
}
$field_value = apply_filters('gform_merge_tag_filter', $field_value, $merge_tag, $options, $field, $raw_field_value);
if ($field_value === false) {
continue;
}
if (!empty($field_value) || strlen($field_value) > 0 || $display_empty) {
switch ($format) {
case 'text':
$field_data .= "{$field_label}: {$field_value}\n\n";
break;
default:
$field_data .= sprintf('<tr bgcolor="%3$s">
<td colspan="2">
<font style="font-family: sans-serif; font-size:12px;"><strong>%1$s</strong></font>
</td>
</tr>
<tr bgcolor="%4$s">
<td width="20"> </td>
<td>
<font style="font-family: sans-serif; font-size:12px;">%2$s</font>
</td>
</tr>
', $field_label, empty($field_value) && strlen($field_value) == 0 ? ' ' : $field_value, esc_attr(apply_filters('gform_email_background_color_label', '#EAF2FA', $field, $lead)), esc_attr(apply_filters('gform_email_background_color_data', '#FFFFFF', $field, $lead)));
break;
}
}
}
}
if ($display_product_summary) {
$field_data .= self::get_submitted_pricing_fields($form, $lead, $format, $use_text, $use_admin_label);
}
if ($format == 'html') {
//.........這裏部分代碼省略.........
示例5: do_lead_detail_grid
public static function do_lead_detail_grid($form, $lead, $config)
{
$form_id = $form['id'];
$results = array();
/*
* Set up our defaults and merge down the user config
*/
$defaults = array('empty_field' => false, 'html_field' => false, 'page_names' => false, 'return' => false, 'section_content' => false);
$config = array_merge($defaults, $config);
if ($config['return'] === true) {
$results['title'] = '<h2 id="details" class="default">' . $form['title'] . '</h2>';
} else {
?>
<div id='container'>
<h2 id='details' class='default'><?php
echo $form['title'];
?>
</h2>
<?php
}
$count = 0;
$field_count = sizeof($form['fields']);
$has_product_fields = false;
$page_number = 0;
foreach ($form['fields'] as $field) {
/*
* Check if this field has been excluded from the list
*/
if (isset($field['cssClass']) && strpos($field['cssClass'], 'exclude') !== false) {
/* skip this field */
continue;
}
/*
* Skip over hidden fields
*/
if (GFFormsModel::is_field_hidden($form, $field, array(), $lead)) {
continue;
}
/*
* Check if we are to show the page names
*/
if ($config['page_names'] === true) {
if ((int) $field['pageNumber'] !== $page_number && isset($form['pagination']['pages'][$page_number])) {
/*
* Display the page number
*/
if ($config['return'] === true) {
$results['field'][] = '<h2 id="field-' . $field['id'] . '" class="default entry-view-page-break">' . $form['pagination']['pages'][$page_number] . '</h2>';
} else {
?>
<h2 id='field-<?php
echo $field['id'];
?>
' class='default entry-view-page-break'><?php
echo $form['pagination']['pages'][$page_number];
?>
</h2>
<?php
}
/*
* Increment the page number
*/
$page_number++;
}
}
$even = $odd = '';
switch (RGFormsModel::get_input_type($field)) {
case 'section':
if (!GFCommon::is_section_empty($field, $form, $lead) || $config['empty_field'] || $config['section_content']) {
$count++;
if ($config['return'] === true) {
$results['field'][] = '<h2 id="field-' . $field['id'] . '" class="default entry-view-section-break">' . esc_html(GFCommon::get_label($field)) . '</h2>';
if ($config['section_content']) {
$results['field'][] = '<div class="default entry-view-section-break entry-view-section-break-content">' . $field['description'] . '</div>';
}
} else {
?>
<h2 id="field-<?php
echo $field['id'];
?>
" class="default entry-view-section-break"><?php
echo esc_html(GFCommon::get_label($field));
?>
</h2>
<?php
if ($config['section_content']) {
?>
<div class="default entry-view-section-break entry-view-section-break-content"><?php
echo $field['description'];
?>
</div>
<?php
}
?>
<?php
}
}
break;
case 'captcha':
//.........這裏部分代碼省略.........
示例6: lead_detail
public static function lead_detail($Form, $lead, $allow_display_empty_fields = false, $inline = true, $options = array())
{
if (!class_exists('GFEntryList')) {
require_once GFCommon::get_base_path() . "/entry_list.php";
}
global $current_user, $_gform_directory_approvedcolumn;
get_currentuserinfo();
$display_empty_fields = '';
$allow_display_empty_fields = true;
if ($allow_display_empty_fields) {
$display_empty_fields = @rgget("gf_display_empty_fields", $_COOKIE);
}
if (empty($options)) {
$options = self::directory_defaults();
}
// There is no edit link
if (isset($_GET['edit']) || RGForms::post("action") === "update") {
// Process editing leads
$lead = self::edit_lead_detail($Form, $lead, $options);
if (RGForms::post("action") !== "update") {
return;
}
}
extract($options);
?>
<table cellspacing="0" class="widefat fixed entry-detail-view">
<?php
$title = str_replace('%%formtitle%%', $Form["title"], str_replace('%%leadid%%', $lead['id'], $entrydetailtitle));
if (!empty($title) && $inline) {
?>
<thead>
<tr>
<th id="details" colspan="2" scope="col">
<?php
$title = apply_filters('kws_gf_directory_detail_title', apply_filters('kws_gf_directory_detail_title_' . (int) $lead['id'], array($title, $lead), true), true);
if (is_array($title)) {
echo $title[0];
} else {
echo $title;
}
?>
</th>
</tr>
</thead>
<?php
}
?>
<tbody>
<?php
$count = 0;
$has_product_fields = false;
$field_count = sizeof($Form["fields"]);
$display_value = '';
foreach ($Form["fields"] as $field) {
// Don't show fields defined as hide in single.
if (!empty($field['hideInSingle'])) {
if (self::has_access("gravityforms_directory")) {
echo "\n\t\t\t\t\t\t\t\t\t" . '<!-- ' . sprintf(esc_html__('(Admin-only notice) Field #%d not shown: "Hide This Field in Single Entry View" was selected.', 'gravity-forms-addons'), $field['id']) . ' -->' . "\n\n";
}
continue;
}
$count++;
$is_last = $count >= $field_count ? true : false;
switch (RGFormsModel::get_input_type($field)) {
case "section":
if (!GFCommon::is_section_empty($field, $Form, $lead) || $display_empty_fields) {
$count++;
$is_last = $count >= $field_count ? true : false;
?>
<tr>
<td colspan="2" class="entry-view-section-break<?php
echo $is_last ? " lastrow" : "";
?>
"><?php
echo esc_html(GFCommon::get_label($field));
?>
</td>
</tr>
<?php
}
break;
case "captcha":
case "html":
case "password":
case "page":
//ignore captcha, html, password, page field
break;
case "post_image":
$value = RGFormsModel::get_lead_field_value($lead, $field);
$valueArray = explode("|:|", $value);
@(list($url, $title, $caption, $description) = $valueArray);
if (!empty($url)) {
$value = $display_value = self::render_image_link($url, $lead, $options, $title, $caption, $description);
}
break;
default:
//ignore product fields as they will be grouped together at the end of the grid
if (GFCommon::is_product_field($field["type"])) {
$has_product_fields = true;
continue;
//.........這裏部分代碼省略.........
示例7: getmetaData
function getmetaData($entry_id)
{
$return = '';
$metaData = mf_get_form_meta('entry_id', $entry_id);
foreach ($metaData as $data) {
$entry = GFAPI::get_entry($data->lead_id);
//check if entry-id is valid
if (is_array($entry)) {
//display entry data
$formPull = GFAPI::get_form($data->form_id);
$return .= '<h2>' . $formPull['title'] . '</h2>';
$return .= '<table>';
foreach ($formPull['fields'] as $formFields) {
$gwreadonly_enable = isset($formFields['gwreadonly_enable']) ? $formFields['gwreadonly_enable'] : 0;
//exclude page breaks and the entry fields used to verify the entry
// and the display only fields from the additional forms
if ($formFields['type'] != 'page' && $formFields['inputName'] != 'entry-id' && $formFields['inputName'] != 'contact-email' && $gwreadonly_enable != 1) {
$display_empty_fields = false;
switch (RGFormsModel::get_input_type($formFields)) {
case 'section':
if (!GFCommon::is_section_empty($formFields, $formPull, $entry) || $display_empty_fields) {
$count++;
$is_last = $count >= $field_count ? true : false;
?>
<tr>
<td colspan="2" class="entry-view-section-break<?php
echo $is_last ? ' lastrow' : '';
?>
"><?php
echo esc_html(GFCommon::get_label($formFields));
?>
</td>
</tr>
<?php
}
break;
case 'captcha':
case 'html':
case 'password':
case 'page':
//ignore captcha, html, password, page field
break;
default:
//ignore product fields as they will be grouped together at the end of the grid
if (GFCommon::is_product_field($formFields->type)) {
$has_product_fields = true;
continue;
}
$value = RGFormsModel::get_lead_field_value($entry, $formFields);
$display_value = GFCommon::get_lead_field_display($formFields, $value, $entry['currency']);
$display_value = apply_filters('gform_entry_field_value', $display_value, $formFields, $entry, $formPull);
if ($display_empty_fields || !empty($display_value) || $display_value === '0') {
$display_value = empty($display_value) && $display_value !== '0' ? ' ' : $display_value;
$content = '
<tr>
<td colspan="2" class="entry-view-field-name">' . esc_html(GFCommon::get_label($formFields)) . '</td>
</tr>
<tr>
<td colspan="2" class="entry-view-field-value">' . $display_value . '</td>
</tr>';
$content = apply_filters('gform_field_content', $content, $formFields, $value, $entry['id'], $formPull['id']);
$return .= $content;
}
break;
}
}
}
$return .= '</table>';
}
}
return $return;
}
示例8: entry_detail_grid
/**
* @param $form
* @param $entry
* @param bool|false $allow_display_empty_fields
* @param array $editable_fields
* @param Gravity_Flow_Step|null $current_step
*/
public static function entry_detail_grid($form, $entry, $allow_display_empty_fields = false, $editable_fields = array(), $current_step = null)
{
$form_id = absint($form['id']);
$display_empty_fields = false;
if ($allow_display_empty_fields) {
$display_empty_fields = rgget('gf_display_empty_fields', $_COOKIE);
}
$display_empty_fields = (bool) apply_filters('gravityflow_entry_detail_grid_display_empty_fields', $display_empty_fields, $form, $entry);
$condtional_logic_enabled = $current_step && $current_step->conditional_logic_editable_fields_enabled;
self::register_form_init_scripts($form, array(), $condtional_logic_enabled);
if (apply_filters('gform_init_scripts_footer', false)) {
add_action('wp_footer', create_function('', 'GFFormDisplay::footer_init_scripts(' . $form['id'] . ');'), 20);
add_action('gform_preview_footer', create_function('', 'GFFormDisplay::footer_init_scripts(' . $form['id'] . ');'));
} else {
echo GFFormDisplay::get_form_init_scripts($form);
$current_page = 1;
$scripts = "<script type='text/javascript'>" . apply_filters('gform_cdata_open', '') . " jQuery(document).ready(function(){jQuery(document).trigger('gform_post_render', [{$form_id}, {$current_page}]) } ); " . apply_filters('gform_cdata_close', '') . '</script>';
echo $scripts;
}
?>
<input type="hidden" name="action" id="action" value="" />
<input type="hidden" name="save" id="action" value="Update" />
<input type="hidden" name="screen_mode" id="screen_mode" value="<?php
echo esc_attr(rgpost('screen_mode'));
?>
" />
<table cellspacing="0" class="widefat fixed entry-detail-view">
<thead>
<tr>
<th id="details">
<?php
$title = sprintf('%s : %s %s', esc_html($form['title']), __('Entry # ', 'gravityflow'), absint($entry['id']));
echo apply_filters('gravityflow_title_entry_detail', $title, $form, $entry);
?>
</th>
<th style="width:140px; font-size:10px; text-align: right;">
<?php
if ($allow_display_empty_fields) {
?>
<input type="checkbox" id="gentry_display_empty_fields" <?php
echo $display_empty_fields ? "checked='checked'" : '';
?>
onclick="ToggleShowEmptyFields();" />
<label for="gentry_display_empty_fields"><?php
_e('show empty fields', 'gravityflow');
?>
</label>
<?php
}
?>
</th>
</tr>
</thead>
<tbody class="<?php
echo GFCommon::get_ul_classes($form);
?>
">
<?php
$count = 0;
$field_count = sizeof($form['fields']);
$has_product_fields = false;
$display_fields_mode = $current_step ? $current_step->display_fields_mode : 'all_fields';
$display_fields_selected = $current_step && is_array($current_step->display_fields_selected) ? $current_step->display_fields_selected : array();
foreach ($form['fields'] as &$field) {
/* @var GF_Field $field */
$display_field = true;
if ($display_fields_mode == 'selected_fields') {
if (!in_array($field->id, $display_fields_selected)) {
$display_field = false;
}
} else {
if (GFFormsModel::is_field_hidden($form, $field, array(), $entry)) {
$display_field = false;
}
}
$display_field = (bool) apply_filters('gravityflow_workflow_detail_display_field', $display_field, $field, $form, $entry, $current_step);
switch (RGFormsModel::get_input_type($field)) {
case 'section':
if (!GFCommon::is_section_empty($field, $form, $entry) || $display_empty_fields) {
$count++;
$is_last = $count >= $field_count ? true : false;
?>
<tr>
<td colspan="2" class="entry-view-section-break<?php
echo $is_last ? ' lastrow' : '';
?>
"><?php
echo esc_html(rgar($field, 'label'));
?>
</td>
</tr>
//.........這裏部分代碼省略.........