本文整理汇总了PHP中RGFormsModel::get_submitted_fields方法的典型用法代码示例。如果您正苦于以下问题:PHP RGFormsModel::get_submitted_fields方法的具体用法?PHP RGFormsModel::get_submitted_fields怎么用?PHP RGFormsModel::get_submitted_fields使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类RGFormsModel
的用法示例。
在下文中一共展示了RGFormsModel::get_submitted_fields方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: forms_page
//.........这里部分代码省略.........
echo GFCommon::get_base_url();
?>
/js/jquery-ui/ui.datepicker.js?ver=<?php
echo GFCommon::$version;
?>
"></script>
<link rel="stylesheet" href="<?php
echo GFCommon::get_base_url();
?>
/css/jquery-ui-1.7.2.custom.css?ver=<?php
echo GFCommon::$version;
?>
" type="text/css" />
<link rel="stylesheet" href="<?php
echo GFCommon::get_base_url();
?>
/css/admin.css?ver=<?php
echo GFCommon::$version;
?>
" type="text/css" />
<script type="text/javascript">
jQuery(document).ready(
function() {
jQuery('.datepicker').datepicker({showOn: "both", buttonImage: "<?php
echo GFCommon::get_base_url();
?>
/images/calendar.png", buttonImageOnly: true});
}
);
function has_entry(fieldNumber){
var submitted_fields = new Array(<?php
echo RGFormsModel::get_submitted_fields($form_id);
?>
);
for(var i=0; i<submitted_fields.length; i++){
if(submitted_fields[i] == fieldNumber)
return true;
}
return false;
}
function InsertVariable(element_id, callback, variable){
if(!variable)
variable = jQuery('#' + element_id + '_variable_select').val();
var messageElement = jQuery("#" + element_id);
if(document.selection) {
// Go the IE way
messageElement[0].focus();
document.selection.createRange().text=variable;
}
else if(messageElement[0].selectionStart) {
// Go the Gecko way
obj = messageElement[0]
obj.value = obj.value.substr(0, obj.selectionStart) + variable + obj.value.substr(obj.selectionEnd, obj.value.length);
}
else {
messageElement.val(variable + messageElement.val());
}
jQuery('#' + element_id + '_variable_select')[0].selectedIndex = 0;
if(callback && window[callback])
示例2: forms_page
public static function forms_page($form_id)
{
global $wpdb;
if (!GFCommon::ensure_wp_version()) {
return;
}
$update_result = '';
if (rgpost('operation') == 'trash') {
check_admin_referer('gforms_trash_form', 'gforms_trash_form');
GFFormsModel::trash_form($form_id);
?>
<script type="text/javascript">
jQuery(document).ready(
function () {
document.location.href = '?page=gf_edit_forms';
}
);
</script>
<?php
exit;
} else {
if (!rgempty('gform_meta')) {
check_admin_referer("gforms_update_form_{$form_id}", 'gforms_update_form');
$update_result = self::save_form_info($form_id, rgpost('gform_meta', false));
}
}
require_once GFCommon::get_base_path() . '/currency.php';
wp_print_styles(array('thickbox'));
/* @var GF_Field_Address $gf_address_field */
$gf_address_field = GF_Fields::get('address');
?>
<link rel="stylesheet" href="<?php
echo GFCommon::get_base_url();
?>
/css/admin.css?ver=<?php
echo GFCommon::$version;
?>
" type="text/css" />
<script type="text/javascript">
<?php
GFCommon::gf_global();
?>
<?php
GFCommon::gf_vars();
?>
</script>
<script type="text/javascript">
function has_entry(fieldNumber) {
var submitted_fields = [<?php
echo RGFormsModel::get_submitted_fields($form_id);
?>
];
for (var i = 0; i < submitted_fields.length; i++) {
if (submitted_fields[i] == fieldNumber)
return true;
}
return false;
}
function InsertPostImageVariable(element_id, callback) {
var variable = jQuery('#' + element_id + '_image_size_select').attr("variable");
var size = jQuery('#' + element_id + '_image_size_select').val();
if (size) {
variable = "{" + variable + ":" + size + "}";
InsertVariable(element_id, callback, variable);
jQuery('#' + element_id + '_image_size_select').hide();
jQuery('#' + element_id + '_image_size_select')[0].selectedIndex = 0;
}
}
function InsertPostContentVariable(element_id, callback) {
var variable = jQuery('#' + element_id + '_variable_select').val();
var regex = /{([^{]*?: *(\d+\.?\d*).*?)}/;
matches = regex.exec(variable);
if (!matches) {
InsertVariable(element_id, callback);
return;
}
variable = matches[1];
field_id = matches[2];
for (var i = 0; i < form["fields"].length; i++) {
if (form["fields"][i]["id"] == field_id) {
if (form["fields"][i]["type"] == "post_image") {
jQuery('#' + element_id + '_image_size_select').attr("variable", variable);
jQuery('#' + element_id + '_image_size_select').show();
return;
}
}
}
InsertVariable(element_id, callback);
}
//.........这里部分代码省略.........
示例3: forms_page
public static function forms_page($form_id)
{
global $wpdb;
if (!GFCommon::ensure_wp_version()) {
return;
}
if ($_POST["operation"] == "delete") {
check_admin_referer('gforms_delete_form', 'gforms_delete_form');
RGFormsModel::delete_form($form_id);
?>
<script>
jQuery(document).ready(
function(){document.location.href="?page=gf_edit_forms";}
);
</script>
<?php
exit;
}
wp_print_scripts(array("jquery-ui-core", "jquery-ui-sortable", "jquery-ui-tabs", "sack", "thickbox"));
wp_print_styles(array("thickbox"));
?>
<script src="<?php
echo GFCommon::get_base_url();
?>
/js/jquery.dimensions.js"></script>
<script src="<?php
echo GFCommon::get_base_url();
?>
/js/floatmenu_init.js"></script>
<script src="<?php
echo GFCommon::get_base_url();
?>
/js/menu.js"></script>
<script src="<?php
echo GFCommon::get_base_url();
?>
/js/jquery.json-1.3.js"></script>
<script src="<?php
echo GFCommon::get_base_url();
?>
/js/jquery.simplemodal-1.3.min.js"></script>
<script src="<?php
echo GFCommon::get_base_url();
?>
/js/forms.js"></script>
<script src="<?php
echo GFCommon::get_base_url();
?>
/js/jquery-ui/ui.datepicker.js"></script>
<link rel="stylesheet" href="<?php
echo GFCommon::get_base_url();
?>
/css/jquery-ui-1.7.2.custom.css" type="text/css" />
<link rel="stylesheet" href="<?php
echo GFCommon::get_base_url();
?>
/css/admin.css" type="text/css" />
<script>
jQuery(document).ready(
function() {
jQuery('.datepicker').datepicker({showOn: "both", buttonImage: "<?php
echo GFCommon::get_base_url();
?>
/images/calendar.png", buttonImageOnly: true});
}
);
function has_entry(fieldNumber){
var submitted_fields = new Array(<?php
echo RGFormsModel::get_submitted_fields($form_id);
?>
);
for(var i=0; i<submitted_fields.length; i++){
if(submitted_fields[i] == fieldNumber)
return true;
}
return false;
}
function InsertVariable(element_id){
var variable = jQuery('#' + element_id + '_variable_select').val();
var messageElement = jQuery("#" + element_id);
if(document.selection) {
// Go the IE way
messageElement[0].focus();
document.selection.createRange().text=variable;
}
else if(messageElement[0].selectionStart) {
// Go the Gecko way
obj = messageElement[0]
obj.value = obj.value.substr(0, obj.selectionStart) + variable + obj.value.substr(obj.selectionEnd, obj.value.length);
}
else {
messageElement.val(variable + messageElement.val());
}
jQuery('#' + element_id + '_variable_select')[0].selectedIndex = 0;
}
//.........这里部分代码省略.........