本文整理汇总了PHP中GFCommon::selection_display方法的典型用法代码示例。如果您正苦于以下问题:PHP GFCommon::selection_display方法的具体用法?PHP GFCommon::selection_display怎么用?PHP GFCommon::selection_display使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类GFCommon
的用法示例。
在下文中一共展示了GFCommon::selection_display方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: get_value_entry_detail
public function get_value_entry_detail($value, $currency = '', $use_text = false, $format = 'html', $media = 'screen')
{
if (empty($value) || $format == 'text') {
return $value;
}
$value = explode(',', $value);
$items = '';
foreach ($value as $item) {
$items .= '<li>' . GFCommon::selection_display($item, $this, $currency, $use_text) . '</li>';
}
return "<ul class='bulleted'>{$items}</ul>";
}
示例2: get_lead_field_display
public static function get_lead_field_display($field, $value, $currency = "", $use_text = false, $format = "html", $media = "screen")
{
if ($field['type'] == 'post_category') {
$value = self::prepare_post_category_value($value, $field);
}
switch (RGFormsModel::get_input_type($field)) {
case "name":
if (is_array($value)) {
$prefix = trim(rgget($field["id"] . ".2", $value));
$first = trim(rgget($field["id"] . ".3", $value));
$last = trim(rgget($field["id"] . ".6", $value));
$suffix = trim(rgget($field["id"] . ".8", $value));
$name = $prefix;
$name .= !empty($name) && !empty($first) ? " {$first}" : $first;
$name .= !empty($name) && !empty($last) ? " {$last}" : $last;
$name .= !empty($name) && !empty($suffix) ? " {$suffix}" : $suffix;
return $name;
} else {
return $value;
}
break;
case "creditcard":
if (is_array($value)) {
$card_number = trim(rgget($field["id"] . ".1", $value));
$card_type = trim(rgget($field["id"] . ".4", $value));
$separator = $format == "html" ? "<br/>" : "\n";
return empty($card_number) ? "" : $card_type . $separator . $card_number;
} else {
return "";
}
break;
case "address":
if (is_array($value)) {
$street_value = trim(rgget($field["id"] . ".1", $value));
$street2_value = trim(rgget($field["id"] . ".2", $value));
$city_value = trim(rgget($field["id"] . ".3", $value));
$state_value = trim(rgget($field["id"] . ".4", $value));
$zip_value = trim(rgget($field["id"] . ".5", $value));
$country_value = trim(rgget($field["id"] . ".6", $value));
$line_break = $format == "html" ? "<br />" : "\n";
$address_display_format = apply_filters("gform_address_display_format", "default");
if ($address_display_format == "zip_before_city") {
/*
Sample:
3333 Some Street
suite 16
2344 City, State
Country
*/
$addr_ary = array();
$addr_ary[] = $street_value;
if (!empty($street2_value)) {
$addr_ary[] = $street2_value;
}
$zip_line = trim($zip_value . " " . $city_value);
$zip_line .= !empty($zip_line) && !empty($state_value) ? ", {$state_value}" : $state_value;
$zip_line = trim($zip_line);
if (!empty($zip_line)) {
$addr_ary[] = $zip_line;
}
if (!empty($country_value)) {
$addr_ary[] = $country_value;
}
$address = implode("<br />", $addr_ary);
} else {
$address = $street_value;
$address .= !empty($address) && !empty($street2_value) ? $line_break . $street2_value : $street2_value;
$address .= !empty($address) && (!empty($city_value) || !empty($state_value)) ? $line_break . $city_value : $city_value;
$address .= !empty($address) && !empty($city_value) && !empty($state_value) ? ", {$state_value}" : $state_value;
$address .= !empty($address) && !empty($zip_value) ? " {$zip_value}" : $zip_value;
$address .= !empty($address) && !empty($country_value) ? $line_break . $country_value : $country_value;
}
//adding map link
if (!empty($address) && $format == "html") {
$address_qs = str_replace($line_break, " ", $address);
//replacing <br/> and \n with spaces
$address_qs = urlencode($address_qs);
$address .= "<br/><a href='http://maps.google.com/maps?q={$address_qs}' target='_blank' class='map-it-link'>Map It</a>";
}
return $address;
} else {
return "";
}
break;
case "email":
return GFCommon::is_valid_email($value) && $format == "html" ? "<a href='mailto:{$value}'>{$value}</a>" : $value;
break;
case "website":
return GFCommon::is_valid_url($value) && $format == "html" ? "<a href='{$value}' target='_blank'>{$value}</a>" : $value;
break;
case "checkbox":
if (is_array($value)) {
$items = '';
foreach ($value as $key => $item) {
if (!empty($item)) {
switch ($format) {
case "text":
$items .= GFCommon::selection_display($item, $field, $currency, $use_text) . ", ";
break;
default:
//.........这里部分代码省略.........
示例3: get_value_export
public function get_value_export($entry, $input_id = '', $use_text = false, $is_csv = false)
{
if (empty($input_id) || absint($input_id) == $input_id) {
$selected = array();
foreach ($this->inputs as $input) {
$index = (string) $input['id'];
if (!rgempty($index, $entry)) {
$selected[] = GFCommon::selection_display(rgar($entry, $index), $this, rgar($entry, 'currency'), $use_text);
}
}
return implode(', ', $selected);
} elseif ($is_csv) {
$value = $this->is_checkbox_checked($input_id, GFCommon::get_label($this, $input_id), $entry);
return empty($value) ? '' : $value;
} else {
return GFCommon::selection_display(rgar($entry, $input_id), $this, rgar($entry, 'currency'), $use_text);
}
}
示例4: get_value_export
/**
* Format the entry value before it is used in entry exports and by framework add-ons using GFAddOn::get_field_value().
*
* @param array $entry The entry currently being processed.
* @param string $input_id The field or input ID.
* @param bool|false $use_text When processing choice based fields should the choice text be returned instead of the value.
* @param bool|false $is_csv Is the value going to be used in the .csv entries export?
*
* @return string
*/
public function get_value_export($entry, $input_id = '', $use_text = false, $is_csv = false)
{
if (empty($input_id)) {
$input_id = $this->id;
}
$value = rgar($entry, $input_id);
if (!empty($value) && !$is_csv) {
$items = explode(',', $value);
foreach ($items as &$item) {
$item = GFCommon::selection_display($item, $this, rgar($entry, 'currency'), $use_text);
}
$value = GFCommon::implode_non_blank(', ', $items);
}
return $value;
}
示例5: get_lead_field_display
public static function get_lead_field_display($field, $value, $currency = "", $use_text = false)
{
switch (RGFormsModel::get_input_type($field)) {
case "name":
if (is_array($value)) {
$prefix = trim($value[$field["id"] . ".2"]);
$first = trim($value[$field["id"] . ".3"]);
$last = trim($value[$field["id"] . ".6"]);
$suffix = trim($value[$field["id"] . ".8"]);
$name = $prefix;
$name .= !empty($name) && !empty($first) ? " {$first}" : $first;
$name .= !empty($name) && !empty($last) ? " {$last}" : $last;
$name .= !empty($name) && !empty($suffix) ? " {$suffix}" : $suffix;
return $name;
} else {
return $value;
}
break;
case "address":
if (is_array($value)) {
$street_value = trim($value[$field["id"] . ".1"]);
$street2_value = trim($value[$field["id"] . ".2"]);
$city_value = trim($value[$field["id"] . ".3"]);
$state_value = trim($value[$field["id"] . ".4"]);
$zip_value = trim($value[$field["id"] . ".5"]);
$country_value = trim($value[$field["id"] . ".6"]);
$address_display_format = apply_filters("gform_address_display_format", "street,city,state,zip,country");
if ($address_display_format == "zip_before_city") {
/*
Sample:
3333 Some Street
suite 16
2344 City, State
Country
*/
$addr_ary = array();
$addr_ary[] = $street_value;
if (!empty($street2_value)) {
$addr_ary[] = $street2_value;
}
$zip_line = trim($zip_value . " " . $city_value);
$zip_line .= !empty($zip_line) && !empty($state_value) ? ", {$state_value}" : $state_value;
$zip_line = trim($zip_line);
if (!empty($zip_line)) {
$addr_ary[] = $zip_line;
}
if (!empty($country_value)) {
$addr_ary[] = $country_value;
}
$address = implode("<br />", $addr_ary);
} else {
$address = $street_value;
$address .= !empty($address) && !empty($street2_value) ? "<br />{$street2_value}" : $street2_value;
$address .= !empty($address) && (!empty($city_value) || !empty($state_value)) ? "<br />{$city_value}" : $city_value;
$address .= !empty($address) && !empty($city_value) && !empty($state_value) ? ", {$state_value}" : $state_value;
$address .= !empty($address) && !empty($zip_value) ? " {$zip_value}" : $zip_value;
$address .= !empty($address) && !empty($country_value) ? "<br />{$country_value}" : $country_value;
}
//adding map link
if (!empty($address)) {
$address_qs = str_replace("<br />", " ", $address);
//replacing <br/> with spaces
$address_qs = urlencode($address_qs);
$address .= "<br/><a href='http://maps.google.com/maps?q={$address_qs}' target='_blank' class='map-it-link'>Map It</a>";
}
return $address;
} else {
return "";
}
break;
case "email":
return GFCommon::is_valid_email($value) ? "<a href='mailto:{$value}'>{$value}</a>" : $value;
break;
case "website":
return GFCommon::is_valid_url($value) ? "<a href='{$value}' target='_blank'>{$value}</a>" : $value;
break;
case "checkbox":
if (is_array($value)) {
foreach ($value as $key => $item) {
if (!empty($item)) {
$items .= "<li>" . GFCommon::selection_display($item, $field, $currency, $use_text) . "</li>";
}
}
return empty($items) ? "" : "<ul class='bulleted'>{$items}</ul>";
} else {
return $value;
}
break;
case "post_image":
list($url, $title, $caption, $description) = explode("|:|", $value);
if (!empty($url)) {
$url = str_replace(" ", "%20", $url);
$value = "<a href='{$url}' target='_blank' title='" . __("Click to view", "gravityforms") . "'><img src='{$url}' width='100' /></a>";
$value .= !empty($title) ? "<div>Title: {$title}</div>" : "";
$value .= !empty($caption) ? "<div>Caption: {$caption}</div>" : "";
$value .= !empty($description) ? "<div>Description: {$description}</div>" : "";
}
return $value;
case "fileupload":
$file_path = $value;
//.........这里部分代码省略.........
示例6: gform_merge_tag_filter
/**
* @used-by Filters\"gform_merge_tag_filter"
* @param mixed $value
* @param int $input_id
* @param array $match
* @param array $field
* @param mixed $raw_value
*/
public function gform_merge_tag_filter($value, $input_id, $match, $field, $raw_value)
{
if (\GFFormsModel::get_input_type($field) != 'multiselect') {
return $value;
}
$options = [];
$value = explode(',', $value);
foreach ($value as $selected) {
$options[] = GFCommon::selection_display($selected, $field, $currency = null, $use_text = true);
}
return implode(', ', $options);
}
示例7: get_value_export
public function get_value_export($entry, $input_id = '', $use_text = false, $is_csv = false)
{
if (empty($input_id)) {
$input_id = $this->id;
}
$value = rgar($entry, $input_id);
return $is_csv ? $value : GFCommon::selection_display($value, $this, rgar($entry, 'currency'), $use_text);
}
示例8: get_rank_entry_value_formatted
public function get_rank_entry_value_formatted($field, $value)
{
$ordered_values = explode(',', $value);
$new_value = "<ol class='gsurvey-rank-entry'>";
foreach ($ordered_values as $ordered_value) {
$ordered_label = GFCommon::selection_display($ordered_value, $field, $currency = '', $use_text = true);
$new_value .= sprintf('<li>%s</li>', $ordered_label);
}
$new_value .= '</ol>';
return $new_value;
}
示例9: leads_page
//.........这里部分代码省略.........
case "post_category":
$ary = explode(":", $value);
$cat_name = count($ary) > 0 ? $ary[0] : "";
$value = $cat_name;
break;
case "fileupload":
$file_path = $value;
if (!empty($file_path)) {
//displaying thumbnail (if file is an image) or an icon based on the extension
$thumb = self::get_icon_url($file_path);
$file_path = esc_attr($file_path);
$value = "<a href='{$file_path}' target='_blank' title='" . __("Click to view", "gravityforms") . "'><img src='{$thumb}'/></a>";
}
break;
case "source_url":
$value = "<a href='" . esc_attr($lead["source_url"]) . "' target='_blank' alt='" . esc_attr($lead["source_url"]) . "' title='" . esc_attr($lead["source_url"]) . "'>.../" . esc_attr(GFCommon::truncate_url($lead["source_url"])) . "</a>";
break;
case "textarea":
case "post_content":
case "post_excerpt":
$value = esc_html($value);
break;
case "date_created":
case "payment_date":
$value = GFCommon::format_date($value, false);
break;
case "date":
$field = RGFormsModel::get_field($form, $field_id);
$value = GFCommon::date_display($value, $field["dateFormat"]);
break;
case "radio":
case "select":
$field = RGFormsModel::get_field($form, $field_id);
$value = GFCommon::selection_display($value, $field, $lead["currency"]);
break;
case "total":
case "payment_amount":
$value = GFCommon::to_money($value, $lead["currency"]);
break;
case "created_by":
if (!empty($value)) {
$userdata = get_userdata($value);
$value = $userdata->user_login;
}
break;
default:
$value = esc_html($value);
}
$value = apply_filters("gform_entries_field_value", $value, $form_id, $field_id, $lead);
$query_string = "gf_entries&view=entry&id={$form_id}&lid={$lead["id"]}{$search_qs}{$sort_qs}{$dir_qs}&paged=" . $page_index + 1;
if ($is_first_column) {
?>
<td class="column-title" >
<a href="admin.php?page=gf_entries&view=entry&id=<?php
echo $form_id;
?>
&lid=<?php
echo $lead["id"] . $search_qs . $sort_qs . $dir_qs;
?>
&paged=<?php
echo $page_index + 1;
?>
"><?php
echo $value;
?>
</a>
示例10: get_value_entry_detail
public function get_value_entry_detail($value, $currency = '', $use_text = false, $format = 'html', $media = 'screen')
{
return GFCommon::selection_display($value, $this, $currency, $use_text);
}
示例11: gform_merge_tag_filter
/**
* Get translated field value to use with merge tags.
*/
function gform_merge_tag_filter($value, $input_id, $match, $field, $raw_value)
{
global $sitepress;
//error_log(__FUNCTION__."$value $input_id ".var_export($raw_value,true));
if (RGFormsModel::get_input_type($field) != 'multiselect') {
return $value;
}
$options = array();
$value = explode(',', $value);
foreach ($value as $selected) {
$options[] = GFCommon::selection_display($selected, $field, $currency = NULL, $use_text = true);
}
return implode(', ', $options);
}
示例12: pdf_get_lead_field_display
public static function pdf_get_lead_field_display($field, $value, $currency = '', $use_text = false, $format = 'html', $media = 'screen')
{
if ($field['type'] == 'post_category') {
$value = GFCommon::prepare_post_category_value($value, $field);
}
switch (RGFormsModel::get_input_type($field)) {
case 'name':
if (is_array($value)) {
$prefix = trim(rgget($field['id'] . '.2', $value));
$first = trim(rgget($field['id'] . '.3', $value));
$middle = trim(rgget($field['id'] . '.4', $value));
$last = trim(rgget($field['id'] . '.6', $value));
$suffix = trim(rgget($field['id'] . '.8', $value));
$name = $prefix;
$name .= !empty($name) && !empty($first) ? " {$first}" : $first;
$name .= !empty($name) && !empty($middle) ? " {$middle}" : $middle;
$name .= !empty($name) && !empty($last) ? " {$last}" : $last;
$name .= !empty($name) && !empty($suffix) ? " {$suffix}" : $suffix;
return $name;
} else {
return $value;
}
break;
case 'creditcard':
if (is_array($value)) {
$card_number = trim(rgget($field['id'] . '.1', $value));
$card_type = trim(rgget($field['id'] . '.4', $value));
$separator = $format == 'html' ? '<br/>' : '\\n';
return empty($card_number) ? '' : $card_type . $separator . $card_number;
} else {
return '';
}
break;
case 'address':
if (is_array($value)) {
$street_value = trim(rgget($field['id'] . '.1', $value));
$street2_value = trim(rgget($field['id'] . '.2', $value));
$city_value = trim(rgget($field['id'] . '.3', $value));
$state_value = trim(rgget($field['id'] . '.4', $value));
$zip_value = trim(rgget($field['id'] . '.5', $value));
$country_value = trim(rgget($field['id'] . '.6', $value));
$line_break = $format == 'html' ? '<br />' : '\\n';
$address_display_format = apply_filters('gform_address_display_format', 'default');
if ($address_display_format == 'zip_before_city') {
/*
Sample:
3333 Some Street
suite 16
2344 City, State
Country
*/
$addr_ary = array();
$addr_ary[] = $street_value;
if (!empty($street2_value)) {
$addr_ary[] = $street2_value;
}
$zip_line = trim($zip_value . ' ' . $city_value);
$zip_line .= !empty($zip_line) && !empty($state_value) ? ", {$state_value}" : $state_value;
$zip_line = trim($zip_line);
if (!empty($zip_line)) {
$addr_ary[] = $zip_line;
}
if (!empty($country_value)) {
$addr_ary[] = $country_value;
}
$address = implode('<br />', $addr_ary);
} else {
$address = $street_value;
$address .= !empty($address) && !empty($street2_value) ? $line_break . $street2_value : $street2_value;
$address .= !empty($address) && (!empty($city_value) || !empty($state_value)) ? $line_break . $city_value : $city_value;
$address .= !empty($address) && !empty($city_value) && !empty($state_value) ? ", {$state_value}" : $state_value;
$address .= !empty($address) && !empty($zip_value) ? " {$zip_value}" : $zip_value;
$address .= !empty($address) && !empty($country_value) ? $line_break . $country_value : $country_value;
}
return $address;
} else {
return '';
}
break;
case 'email':
return GFCommon::is_valid_email($value) && $format == 'html' ? '<a href="mailto:' . $value . '">' . $value . '</a>' : $value;
break;
case 'website':
return GFCommon::is_valid_url($value) && $format == 'html' ? '<a href="' . $value . '" target="_blank">' . $value . '</a>' : $value;
break;
case 'checkbox':
if (is_array($value)) {
$items = '';
foreach ($value as $key => $item) {
if (!empty($item)) {
switch ($format) {
case 'text':
$items .= GFCommon::selection_display($item, $field, $currency, true) . ', ';
break;
default:
$items .= '<li>' . GFCommon::selection_display($item, $field, $currency, true) . '</li>';
break;
}
}
}
//.........这里部分代码省略.........
示例13: display_entries_field_value
public function display_entries_field_value($value, $form_id, $field_id)
{
global $_form_metas;
$new_value = $value;
if (!isset($_form_metas[$form_id])) {
$_form_metas[$form_id] = RGFormsModel::get_form_meta($form_id);
}
$form_meta = $_form_metas[$form_id];
$form_meta_field = RGFormsModel::get_field($form_meta, $field_id);
if (rgar($form_meta_field, 'type') == 'poll') {
if ($form_meta_field['inputType'] == 'radio' || $form_meta_field['inputType'] == 'select') {
$new_value = GFCommon::selection_display($value, $form_meta_field, $currency = '', $use_text = true);
} elseif ($form_meta_field['inputType'] == 'checkbox') {
$ary = explode(', ', $value);
$new_values = array();
foreach ($ary as $response) {
$new_values[] = GFCommon::selection_display($response, $form_meta_field, $currency = '', $use_text = true);
}
$new_value = implode(', ', $new_values);
}
}
return $new_value;
}
示例14: leads_page
//.........这里部分代码省略.........
<td >
<img id="star_image_<?php
echo $lead["id"];
?>
" src="<?php
echo GFCommon::get_base_url();
?>
/images/star<?php
echo intval($lead["is_starred"]);
?>
.png" onclick="ToggleStar(this, <?php
echo $lead["id"];
?>
);" />
</td>
<?php
}
$is_first_column = true;
$nowrap_class = "entry_nowrap";
foreach ($field_ids as $field_id) {
$value = RGForms::get($field_id, $lead);
//filtering lead value
$value = apply_filters("gform_get_field_value", $value, $lead, RGFormsModel::get_field($form, $field_id));
$input_type = !empty($columns[$field_id]["inputType"]) ? $columns[$field_id]["inputType"] : $columns[$field_id]["type"];
switch ($input_type) {
case "checkbox":
$value = "";
//if this is the main checkbox field (not an input), display a comma separated list of all inputs
if (absint($field_id) == $field_id) {
$lead_field_keys = array_keys($lead);
$items = array();
foreach ($lead_field_keys as $input_id) {
if (is_numeric($input_id) && absint($input_id) == $field_id) {
$items[] = GFCommon::selection_display(rgar($lead, $input_id), null, $lead["currency"], false);
}
}
$value = GFCommon::implode_non_blank(", ", $items);
} else {
$value = "";
//looping through lead detail values trying to find an item identical to the column label. Mark with a tick if found.
$lead_field_keys = array_keys($lead);
foreach ($lead_field_keys as $input_id) {
//mark as a tick if input label (from form meta) is equal to submitted value (from lead)
if (is_numeric($input_id) && absint($input_id) == absint($field_id)) {
if ($lead[$input_id] == $columns[$field_id]["label"]) {
$value = "<img src='" . GFCommon::get_base_url() . "/images/tick.png'/>";
} else {
$field = RGFormsModel::get_field($form, $field_id);
if (rgar($field, "enableChoiceValue") || rgar($field, "enablePrice")) {
foreach ($field["choices"] as $choice) {
if ($choice["value"] == $lead[$field_id]) {
$value = "<img src='" . GFCommon::get_base_url() . "/images/tick.png'/>";
break;
} else {
if ($field["enablePrice"]) {
$ary = explode("|", $lead[$field_id]);
$val = count($ary) > 0 ? $ary[0] : "";
$price = count($ary) > 1 ? $ary[1] : "";
if ($val == $choice["value"]) {
$value = "<img src='" . GFCommon::get_base_url() . "/images/tick.png'/>";
break;
}
}
}
}
}
示例15: leads_page
//.........这里部分代码省略.........
echo GFCommon::get_base_url();
?>
/images/star<?php
echo intval($lead["is_starred"]);
?>
.png" onclick="ToggleStar(this, <?php
echo $lead["id"] . ",'" . $filter . "'";
?>
);" />
</td>
<?php
}
$is_first_column = true;
$nowrap_class = "entry_nowrap";
foreach ($field_ids as $field_id) {
/* maybe move to function */
$field = RGFormsModel::get_field($form, $field_id);
$value = rgar($lead, $field_id);
if ($field['type'] == 'post_category') {
$value = GFCommon::prepare_post_category_value($value, $field, 'entry_list');
}
//filtering lead value
$value = apply_filters("gform_get_field_value", $value, $lead, $field);
$input_type = !empty($columns[$field_id]["inputType"]) ? $columns[$field_id]["inputType"] : $columns[$field_id]["type"];
switch ($input_type) {
case "checkbox":
$value = "";
//if this is the main checkbox field (not an input), display a comma separated list of all inputs
if (absint($field_id) == $field_id) {
$lead_field_keys = array_keys($lead);
$items = array();
foreach ($lead_field_keys as $input_id) {
if (is_numeric($input_id) && absint($input_id) == $field_id) {
$items[] = GFCommon::selection_display(rgar($lead, $input_id), null, $lead["currency"], false);
}
}
$value = GFCommon::implode_non_blank(", ", $items);
// special case for post category checkbox fields
if ($field['type'] == 'post_category') {
$value = GFCommon::prepare_post_category_value($value, $field, 'entry_list');
}
} else {
$value = "";
if (GFFormsModel::is_checkbox_checked($field_id, $columns[$field_id]["label"], $lead, $form)) {
$value = "<i class='fa fa-check gf_valid'></i>";
}
}
break;
case "post_image":
list($url, $title, $caption, $description) = rgexplode("|:|", $value, 4);
if (!empty($url)) {
//displaying thumbnail (if file is an image) or an icon based on the extension
$thumb = self::get_icon_url($url);
$value = "<a href='" . esc_attr($url) . "' target='_blank' title='" . __("Click to view", "gravityforms") . "'><img src='{$thumb}'/></a>";
}
break;
case "fileupload":
if (rgar($field, "multipleFiles")) {
$uploaded_files_arr = empty($value) ? array() : json_decode($value, true);
$file_count = count($uploaded_files_arr);
if ($file_count > 1) {
$value = empty($uploaded_files_arr) ? "" : sprintf(__("%d files", "gravityforms"), count($uploaded_files_arr));
break;
} elseif ($file_count == 1) {
$value = $uploaded_files_arr[0];
}