本文整理汇总了PHP中FrmFormsHelper::get_form_style_class方法的典型用法代码示例。如果您正苦于以下问题:PHP FrmFormsHelper::get_form_style_class方法的具体用法?PHP FrmFormsHelper::get_form_style_class怎么用?PHP FrmFormsHelper::get_form_style_class使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FrmFormsHelper
的用法示例。
在下文中一共展示了FrmFormsHelper::get_form_style_class方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: esc_attr
<div class="frm_forms <?php
echo FrmFormsHelper::get_form_style_class($values);
?>
" id="frm_form_<?php
echo esc_attr($form->id);
?>
_container">
<?php
if (!isset($include_form_tag) || $include_form_tag) {
?>
<form enctype="<?php
echo esc_attr(apply_filters('frm_form_enctype', 'multipart/form-data', $form));
?>
" method="post" class="frm-show-form <?php
do_action('frm_form_classes', $form);
?>
" id="form_<?php
echo esc_attr($form->form_key);
?>
" <?php
echo $frm_settings->use_html ? '' : 'action=""';
?>
>
<?php
} else {
?>
<div id="form_<?php
echo esc_attr($form->form_key);
?>
" class="frm-show-form <?php
do_action('frm_form_classes', $form);
示例2:
<table class="form_results<?php
echo $atts['style'] ? FrmFormsHelper::get_form_style_class() : '';
?>
" id="form_results<?php
echo (int) $atts['form']->id;
?>
" cellspacing="0">
<thead>
<tr>
<?php
if (in_array('id', $atts['fields'])) {
?>
<th><?php
_e('ID', 'formidable');
?>
</th>
<?php
}
foreach ($atts['form_cols'] as $col) {
?>
<th><?php
echo $col->name;
?>
</th>
<?php
}
if ($atts['edit_link']) {
?>
<th><?php
echo $atts['edit_link'];
?>
示例3: get_form_contents
public static function get_form_contents($form, $title, $description, $atts)
{
global $frm_vars;
$frm_settings = FrmAppHelper::get_settings();
$submit = isset($form->options['submit_value']) ? $form->options['submit_value'] : $frm_settings->submit_value;
$user_ID = get_current_user_id();
$params = FrmForm::get_params($form);
$message = $errors = '';
if ($params['posted_form_id'] == $form->id && $_POST) {
$errors = isset($frm_vars['created_entries'][$form->id]) ? $frm_vars['created_entries'][$form->id]['errors'] : array();
}
$include_form_tag = apply_filters('frm_include_form_tag', true, $form);
$fields = FrmFieldsHelper::get_form_fields($form->id, isset($errors) && !empty($errors));
if ($params['action'] != 'create' || $params['posted_form_id'] != $form->id || !$_POST) {
do_action('frm_display_form_action', $params, $fields, $form, $title, $description);
if (apply_filters('frm_continue_to_new', true, $form->id, $params['action'])) {
$values = FrmEntriesHelper::setup_new_vars($fields, $form);
include FrmAppHelper::plugin_path() . '/classes/views/frm-entries/new.php';
}
return;
}
if (!empty($errors)) {
$values = $fields ? FrmEntriesHelper::setup_new_vars($fields, $form) : array();
include FrmAppHelper::plugin_path() . '/classes/views/frm-entries/new.php';
return;
}
do_action('frm_validate_form_creation', $params, $fields, $form, $title, $description);
if (!apply_filters('frm_continue_to_create', true, $form->id)) {
return;
}
$values = FrmEntriesHelper::setup_new_vars($fields, $form, true);
$created = isset($frm_vars['created_entries']) && isset($frm_vars['created_entries'][$form->id]) ? $frm_vars['created_entries'][$form->id]['entry_id'] : 0;
$conf_method = apply_filters('frm_success_filter', 'message', $form, $form->options, 'create');
if ($created && is_numeric($created) && $conf_method != 'message') {
do_action('frm_success_action', $conf_method, $form, $form->options, $created);
do_action('frm_after_entry_processed', array('entry_id' => $created, 'form' => $form));
return;
}
if ($created && is_numeric($created)) {
$message = isset($form->options['success_msg']) ? $form->options['success_msg'] : $frm_settings->success_msg;
$class = 'frm_message';
} else {
$message = $frm_settings->failed_msg;
$class = 'frm_error_style';
}
$message = FrmFormsHelper::get_success_message(array('message' => $message, 'form' => $form, 'entry_id' => $created, 'class' => $class));
$message = apply_filters('frm_main_feedback', $message, $form, $created);
if (!isset($form->options['show_form']) || $form->options['show_form']) {
require FrmAppHelper::plugin_path() . '/classes/views/frm-entries/new.php';
} else {
global $frm_vars;
self::maybe_load_css($form, $values['custom_style'], $frm_vars['load_css']);
$include_extra_container = 'frm_forms' . FrmFormsHelper::get_form_style_class($values);
include FrmAppHelper::plugin_path() . '/classes/views/frm-entries/errors.php';
}
do_action('frm_after_entry_processed', array('entry_id' => $created, 'form' => $form));
}
示例4: isset
// Add form messages
require FrmAppHelper::plugin_path() . '/classes/views/shared/errors.php';
?>
<div id="poststuff">
<div id="post-body" class="metabox-holder columns-2">
<div id="post-body-content">
<?php
// Add form nav
if (!$values['is_template']) {
FrmAppController::get_form_nav($id, true, 'hide');
}
?>
<div class="frm_form_builder<?php
echo FrmFormsHelper::get_form_style_class($form);
?>
">
<p class="frm_hidden frm-no-margin">
<input type="button" value="<?php
esc_attr_e('Update', 'formidable');
?>
" class="frm_submit_<?php
echo isset($values['ajax_load']) && $values['ajax_load'] ? '' : 'no_';
?>
ajax button-primary" />
<span class="frm-loading-img"></span>
</p>
<form method="post" id="frm_build_form">
示例5: add_delete_entry_message
/**
* If delete_link is set in formresults and frm_action is set to destroy,
* check if entry should be deleted when page is loaded
*/
private static function add_delete_entry_message($atts, &$contents)
{
$action = FrmAppHelper::simple_get('frm_action', 'sanitize_title');
if ($atts['delete_link'] && $action == 'destroy') {
$delete_message = self::ajax_destroy(false, false, false);
$delete_message = '<div class="' . esc_attr($atts['style'] ? FrmFormsHelper::get_form_style_class() : '') . '"><div class="frm_message">' . $delete_message . '</div></div>';
$contents = $delete_message;
}
}