本文整理汇总了PHP中FrmFormsHelper::form_error_class方法的典型用法代码示例。如果您正苦于以下问题:PHP FrmFormsHelper::form_error_class方法的具体用法?PHP FrmFormsHelper::form_error_class怎么用?PHP FrmFormsHelper::form_error_class使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FrmFormsHelper
的用法示例。
在下文中一共展示了FrmFormsHelper::form_error_class方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: wp_kses_post
echo wp_kses_post($message);
?>
</div><?php
} else {
FrmFormsHelper::get_scroll_js($form->id);
// we need to allow scripts here for javascript in the success message
echo $message;
}
}
if (isset($errors) && is_array($errors) && !empty($errors)) {
if (isset($form) && is_object($form)) {
FrmFormsHelper::get_scroll_js($form->id);
}
?>
<div class="<?php
echo esc_attr(FrmFormsHelper::form_error_class());
?>
">
<?php
$img = '';
if (!FrmAppHelper::is_admin()) {
$img = apply_filters('frm_error_icon', $img);
if ($img && !empty($img)) {
?>
<img src="<?php
echo esc_attr($img);
?>
" alt="" />
<?php
}
}
示例2: 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 = self::just_created_entry($form->id);
$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 = FrmFormsHelper::form_error_class();
}
$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));
}