当前位置: 首页>>代码示例>>PHP>>正文


PHP FrmField::is_no_save_field方法代码示例

本文整理汇总了PHP中FrmField::is_no_save_field方法的典型用法代码示例。如果您正苦于以下问题:PHP FrmField::is_no_save_field方法的具体用法?PHP FrmField::is_no_save_field怎么用?PHP FrmField::is_no_save_field使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在FrmField的用法示例。


在下文中一共展示了FrmField::is_no_save_field方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: fill_entry_values

 public static function fill_entry_values($atts, $f, array &$values)
 {
     if (FrmField::is_no_save_field($f->type)) {
         return;
     }
     if ($atts['default_email']) {
         self::get_field_shortcodes_for_default_email($f, $values);
         return;
     }
     if ($atts['entry'] && !isset($atts['entry']->metas[$f->id])) {
         // In case include_blank is set
         $atts['entry']->metas[$f->id] = '';
         if (FrmAppHelper::pro_is_installed()) {
             FrmProEntryMeta::add_post_value_to_entry($f, $atts['entry']);
             FrmProEntryMeta::add_repeating_value_to_entry($f, $atts['entry']);
         }
     }
     $val = '';
     if ($atts['entry']) {
         $prev_val = maybe_unserialize($atts['entry']->metas[$f->id]);
         $meta = array('item_id' => $atts['id'], 'field_id' => $f->id, 'meta_value' => $prev_val, 'field_type' => $f->type);
         //This filter applies to the default-message shortcode and frm-show-entry shortcode only
         if (isset($atts['filter']) && $atts['filter'] == false) {
             $val = $prev_val;
         } else {
             $val = apply_filters('frm_email_value', $prev_val, (object) $meta, $atts['entry']);
         }
     }
     // Don't include blank values
     if (!$atts['include_blank'] && FrmAppHelper::is_empty_value($val)) {
         return;
     }
     self::textarea_display_value($f->type, $atts['plain_text'], $val);
     $val = apply_filters('frm_display_' . $f->type . '_value_custom', $val, array('field' => $f, 'atts' => $atts));
     if (is_array($val)) {
         if ($atts['format'] == 'text') {
             $val = implode(', ', $val);
         } else {
             if ($f->type == 'checkbox') {
                 $val = array_values($val);
             }
         }
     }
     self::maybe_strip_html($atts['plain_text'], $val);
     if ($atts['format'] != 'text') {
         $values[$f->field_key] = $val;
         if (isset($prev_val) && $prev_val != $val && $f->type != 'textarea') {
             $values[$f->field_key . '-value'] = $prev_val;
         }
     } else {
         $values[$f->id] = array('label' => $f->name, 'val' => $val);
     }
 }
开发者ID:hugocica,项目名称:locomotiva-2016,代码行数:53,代码来源:FrmEntryFormat.php

示例2: manage_columns

 public static function manage_columns($columns)
 {
     global $frm_vars, $wpdb;
     $form_id = FrmForm::get_current_form_id();
     $columns[$form_id . '_id'] = 'ID';
     $columns[$form_id . '_item_key'] = esc_html__('Entry Key', 'formidable');
     if (!$form_id) {
         return $columns;
     }
     $form_cols = FrmField::get_all_for_form($form_id, '', 'include');
     foreach ($form_cols as $form_col) {
         if (FrmField::is_no_save_field($form_col->type)) {
             continue;
         }
         if ($form_col->type == 'form' && isset($form_col->field_options['form_select']) && !empty($form_col->field_options['form_select'])) {
             $sub_form_cols = FrmField::get_all_for_form($form_col->field_options['form_select']);
             if ($sub_form_cols) {
                 foreach ($sub_form_cols as $k => $sub_form_col) {
                     if (FrmField::is_no_save_field($sub_form_col->type)) {
                         unset($sub_form_cols[$k]);
                         continue;
                     }
                     $columns[$form_id . '_' . $sub_form_col->field_key . '-_-' . $form_col->id] = FrmAppHelper::truncate($sub_form_col->name, 35);
                     unset($sub_form_col);
                 }
             }
             unset($sub_form_cols);
         } else {
             $col_id = $form_col->field_key;
             if ($form_col->form_id != $form_id) {
                 $col_id .= '-_-form' . $form_col->form_id;
             }
             if (isset($form_col->field_options['separate_value']) && $form_col->field_options['separate_value']) {
                 $columns[$form_id . '_frmsep_' . $col_id] = FrmAppHelper::truncate($form_col->name, 35);
             }
             $columns[$form_id . '_' . $col_id] = FrmAppHelper::truncate($form_col->name, 35);
         }
     }
     $columns[$form_id . '_created_at'] = __('Entry creation date', 'formidable');
     $columns[$form_id . '_updated_at'] = __('Entry update date', 'formidable');
     $columns[$form_id . '_ip'] = 'IP';
     $frm_vars['cols'] = $columns;
     $action = FrmAppHelper::simple_get('frm_action', 'sanitize_title');
     if (FrmAppHelper::is_admin_page('formidable-entries') && in_array($action, array('', 'list', 'destroy'))) {
         add_screen_option('per_page', array('label' => __('Entries', 'formidable'), 'default' => 20, 'option' => 'formidable_page_formidable_entries_per_page'));
     }
     return $columns;
 }
开发者ID:rbkhrlstn,项目名称:formidable-forms,代码行数:48,代码来源:FrmEntriesController.php

示例3: _e

    ?>
</a> |</li>
	        <li><a href="javascript:void(0)" class="frmkeys"><?php 
    _e('Keys', 'formidable');
    ?>
</a></li>
	    </ul>
	    <ul class="alignleft"><li><?php 
    _e('Fields from your form', 'formidable');
    ?>
:</li></ul>
	    <ul class="frm_code_list frm_full_width">
		    <?php 
    if (!empty($fields)) {
        foreach ($fields as $f) {
            if (FrmField::is_no_save_field($f->type) || $f->type == 'data' && (!isset($f->field_options['data_type']) || $f->field_options['data_type'] == 'data' || $f->field_options['data_type'] == '')) {
                continue;
            }
            ?>
                <li>
                    <a href="javascript:void(0)" class="frmids alignright frm_insert_code" data-code="if <?php 
            echo esc_attr($f->id);
            ?>
]<?php 
            esc_attr_e('Conditional text here', 'formidable');
            ?>
[/if <?php 
            echo esc_attr($f->id);
            ?>
">[if <?php 
            echo (int) $f->id;
开发者ID:tshdvs,项目名称:GooseMobile,代码行数:31,代码来源:mb_adv_info.php

示例4: is_no_save_field

 public static function is_no_save_field($type)
 {
     _deprecated_function(__FUNCTION__, '2.0.9', 'FrmField::is_no_save_field');
     return FrmField::is_no_save_field($type);
 }
开发者ID:EyesX,项目名称:formidable-forms,代码行数:5,代码来源:FrmFieldsHelper.php

示例5: is_field_needed

 /**
  * Check if each field is needed in the formresults table
  *
  * @since 2.0.09
  * @param object $f - field
  * @param array $atts
  * @param array $subforms_to_include
  * @return boolean
  */
 private static function is_field_needed($f, $atts, &$subforms_to_include)
 {
     if (!empty($atts['fields'])) {
         if (FrmField::is_no_save_field($f->type)) {
             if (FrmField::is_option_true($f, 'form_select') && (in_array($f->id, $atts['fields']) || in_array($f->field_key, $atts['fields']))) {
                 $subforms_to_include[] = $f->field_options['form_select'];
             }
             return false;
         }
         if (!in_array($f->form_id, $subforms_to_include) && !in_array($f->id, $atts['fields']) && !in_array($f->field_key, $atts['fields'])) {
             return false;
         }
     } else {
         if (FrmField::is_no_save_field($f->type)) {
             return false;
         }
     }
     return true;
 }
开发者ID:swc-dng,项目名称:swcsandbox,代码行数:28,代码来源:FrmProEntriesController.php

示例6: esc_attr

<select name="field_options[form_select_<?php 
echo esc_attr($current_field_id);
?>
]">
    <option value=""><?php 
_e('&mdash; Select Field &mdash;', 'formidable');
?>
</option>
    <?php 
foreach ($fields as $field_option) {
    if (FrmField::is_no_save_field($field_option->type)) {
        continue;
    }
    ?>
    <option value="<?php 
    echo esc_attr($field_option->id);
    ?>
"<?php 
    if (isset($selected_field) && is_object($selected_field)) {
        selected($selected_field->id, $field_option->id);
    }
    ?>
><?php 
    echo '' == $field_option->name ? $field_option->id . ' ' . __('(no label)', 'formidable') : esc_html($field_option->name);
    ?>
</option>
    <?php 
}
?>
</select>
开发者ID:swc-dng,项目名称:swcsandbox,代码行数:30,代码来源:field-selection.php

示例7: esc_attr

?>
,<?php 
echo esc_attr($meta_name);
?>
,'<?php 
echo esc_attr($field['type']);
?>
')">
    <option value=""><?php 
_e('&mdash; Select &mdash;');
?>
</option>
    <?php 
$sel = false;
foreach ($form_fields as $ff) {
    if ($ff->id == $field['id'] || FrmField::is_no_save_field($ff->type) || in_array($ff->type, array('file', 'rte', 'date')) || FrmProField::is_list_field($ff)) {
        continue;
    }
    $selected = $ff->id == $hide_field ? ' selected="selected"' : '';
    if (!empty($selected)) {
        $sel = true;
    }
    ?>
    <option value="<?php 
    echo esc_attr($ff->id);
    ?>
"<?php 
    echo $selected;
    ?>
><?php 
    echo esc_html(FrmAppHelper::truncate($ff->name, 24));
开发者ID:swc-dng,项目名称:swcsandbox,代码行数:31,代码来源:_logic_row.php

示例8: esc_attr

                <?php 
    }
    ?>
</td>
                <td>
                    <select name="data_array[<?php 
    echo esc_attr($i);
    ?>
]" id="mapping_<?php 
    echo esc_attr($i);
    ?>
">
                        <option value=""> </option>
                        <?php 
    foreach ($fields as $field) {
        if (FrmField::is_no_save_field($field->type)) {
            continue;
        }
        $selected = strtolower(strip_tags($field->name)) == strtolower(htmlspecialchars($header));
        $selected = apply_filters('frm_map_csv_field', $selected, $field, $header);
        ?>
                            <option value="<?php 
        echo esc_attr($field->id);
        ?>
" <?php 
        selected($selected, true);
        ?>
><?php 
        echo FrmAppHelper::truncate($field->name, 50);
        ?>
</option>
开发者ID:swc-dng,项目名称:swcsandbox,代码行数:31,代码来源:map_csv_fields.php

示例9: foreach

<?php

if (empty($values['fields'])) {
    return;
}
foreach ($values['fields'] as $fo_key => $fo) {
    // don't include repeatable fields
    if (isset($post_field) && !in_array($fo['type'], $post_field) || FrmField::is_no_save_field($fo['type']) || $fo['type'] == 'form' || $fo['form_id'] != $values['id']) {
        continue;
    }
    if ($fo['post_field'] == $post_key) {
        $values[$post_key] = $fo['id'];
    }
    ?>
    <option value="<?php 
    echo $fo['id'];
    ?>
" <?php 
    selected($form_action->post_content[$post_key], $fo['id']);
    ?>
><?php 
    echo FrmAppHelper::truncate($fo['name'], 50);
    unset($fo);
    ?>
</option>
<?php 
}
开发者ID:swc-dng,项目名称:swcsandbox,代码行数:27,代码来源:_post_field_options.php

示例10: esc_attr

[<?php 
echo esc_attr($sanitized_name);
?>
][field_id]" class="frm_single_post_field">
        <option value=""><?php 
_e('&mdash; Select Field &mdash;', 'formidable');
?>
</option>
        <?php 
if (!empty($values['fields'])) {
    if (!isset($custom_data['field_id'])) {
        $custom_data['field_id'] = '';
    }
    foreach ($values['fields'] as $fo) {
        $fo = (array) $fo;
        if (!FrmField::is_no_save_field($fo['type'])) {
            ?>
		<option value="<?php 
            echo esc_attr($fo['id']);
            ?>
" <?php 
            selected($custom_data['field_id'], $fo['id']);
            ?>
><?php 
            echo FrmAppHelper::truncate($fo['name'], 50);
            ?>
</option>
        <?php 
        }
        unset($fo);
    }
开发者ID:swc-dng,项目名称:swcsandbox,代码行数:31,代码来源:_custom_field_row.php


注:本文中的FrmField::is_no_save_field方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。