コード例 #1
0
                                ?>
 <?php 
                                do_action('frm_field_input_html', $field);
                                ?>
 /><?php 
                                if (!isset($atts) || !isset($atts['label']) || $atts['label']) {
                                    echo ' ' . $opt . '</label>';
                                }
                                FrmFieldsHelper::include_other_input(array('other_opt' => $other_opt, 'read_only' => $read_only, 'checked' => $checked, 'name' => $other_args['name'], 'value' => $other_args['value'], 'field' => $field, 'html_id' => $html_id, 'opt_key' => $opt_key));
                                unset($other_opt, $other_args, $checked);
                                ?>
</div>
<?php 
                            }
                        }
                    }
                } else {
                    if ($field['type'] == 'captcha' && !FrmAppHelper::is_admin()) {
                        $frm_settings = FrmAppHelper::get_settings();
                        if (!empty($frm_settings->pubkey)) {
                            FrmFieldsHelper::display_recaptcha($field);
                        }
                    } else {
                        do_action('frm_form_fields', $field, $field_name, compact('errors', 'html_id'));
                        do_action('frm_form_field_' . $field['type'], $field, $field_name, compact('errors', 'html_id'));
                    }
                }
            }
        }
    }
}
コード例 #2
0
ファイル: input.php プロジェクト: amit0773/manaslake
                                    echo ' ' . $opt . '</label>';
                                }
                                ?>
</div>
<?php 
                            }
                        }
                    }
                } else {
                    if ($field['type'] == 'captcha' && (!is_admin() || defined('DOING_AJAX'))) {
                        global $frm_settings;
                        $error_msg = null;
                        if (!empty($errors)) {
                            foreach ($errors as $error_key => $error) {
                                if (strpos($error_key, 'captcha-') === 0) {
                                    $error_msg = preg_replace('/^captcha-/', '', $error_key);
                                }
                                unset($error);
                            }
                        }
                        if (!empty($frm_settings->pubkey)) {
                            FrmFieldsHelper::display_recaptcha($field, $error_msg);
                        }
                    } else {
                        do_action('frm_form_fields', $field, $field_name);
                    }
                }
            }
        }
    }
}