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


PHP GFCommon::get_selection_fields方法代码示例

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


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

示例1: edit_page


//.........这里部分代码省略.........
                </select>
                &nbsp;&nbsp;
                <img src="<?php 
        echo self::get_base_url();
        ?>
/images/loading.gif" id="campaignmonitor_wait_form" style="display: none;"/>
            </div>

            <div id="campaignmonitor_field_group" valign="top" <?php 
        echo empty($client_id) || empty($config["meta"]["contact_list_id"]) || empty($config["form_id"]) ? "style='display:none;'" : "";
        ?>
>

                <div id="campaignmonitor_field_container" valign="top" class="margin_vertical_10" >
                    <label for="campaignmonitor_fields" class="left_header"><?php 
        _e("Map Fields", "gravityformscampaignmonitor");
        ?>
 <?php 
        gform_tooltip("campaignmonitor_map_fields");
        ?>
</label>

                    <div id="campaignmonitor_field_list">
                    <?php 
        if (!empty($config["form_id"])) {
            //getting list of all Campaign Monitor merge variables for the selected contact list
            if (empty($merge_vars)) {
                $merge_vars = $api->listMergeVars($list_id);
            }
            //getting field map UI
            echo self::get_field_mapping($config, $config["form_id"], $merge_vars);
            //getting list of selection fields to be used by the optin
            $form_meta = RGFormsModel::get_form_meta($config["form_id"]);
            $selection_fields = GFCommon::get_selection_fields($form_meta, rgar($config["meta"], "optin_field_id"));
        }
        ?>
                    </div>
                </div>

                <div id="campaignmonitor_optin_container" valign="top" class="margin_vertical_10">
                    <label for="campaignmonitor_optin" class="left_header"><?php 
        _e("Opt-In Condition", "gravityformscampaignmonitor");
        ?>
 <?php 
        gform_tooltip("campaignmonitor_optin_condition");
        ?>
</label>
                    <div id="campaignmonitor_optin">
                        <table>
                            <tr>
                                <td>
                                    <input type="checkbox" id="campaignmonitor_optin_enable" name="campaignmonitor_optin_enable" value="1" onclick="if(this.checked){jQuery('#campaignmonitor_optin_condition_field_container').show('slow');} else{jQuery('#campaignmonitor_optin_condition_field_container').hide('slow');}" <?php 
        echo rgar($config["meta"], "optin_enabled") ? "checked='checked'" : "";
        ?>
/>
                                    <label for="campaignmonitor_optin_enable"><?php 
        _e("Enable", "gravityformscampaignmonitor");
        ?>
</label>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <div id="campaignmonitor_optin_condition_field_container" <?php 
        echo !rgar($config["meta"], "optin_enabled") ? "style='display:none'" : "";
        ?>
开发者ID:hypenotic,项目名称:slowfood,代码行数:67,代码来源:campaignmonitor.php

示例2: edit_page


//.........这里部分代码省略.........
            // deprecated in favor of new method for generating error messages, preserved for users who may be using this
            $is_validation_error = apply_filters("gform_user_registration_config_validation", false, $config);
            if (!$config["meta"]["email"] && !$is_update_feed) {
                $error_messages[] = __('You must map the "Email Address" setting to a field.', 'gravityformsuserregistration');
            }
            if (!$config["meta"]["username"] && !$is_update_feed) {
                $error_messages[] = __('You must map the "Username" setting to a field.', 'gravityformsuserregistration');
            }
            $error_messages = apply_filters('gform_user_confirm_validation_error', $error_messages, $config);
            // validate and create/update feed
            if (empty($error_messages)) {
                $id = GFUserData::update_feed($id, $config["form_id"], $config["is_active"], $config["meta"]);
                ?>

                <div class="updated fade">
                    <p><?php 
                echo sprintf(__("Feed Updated. %sback to list%s", "gravityformsuserregistration"), "<a href='?page=gf_user_registration'>", "</a>");
                ?>
</p>
                </div>

                <?php 
            } else {
                $is_validation_error = true;
            }
        }
        $form = isset($config["form_id"]) && $config["form_id"] ? RGFormsModel::get_form_meta($config["form_id"]) : array();
        $form_fields = $email_fields = $selection_fields = $password_fields = array();
        $set_author_style = 'display:none';
        if (!empty($form)) {
            $set_author_style = GFCommon::has_post_field($form['fields']) ? 'display:block' : 'display:none';
            $form_fields = self::get_form_fields($form, $is_update_feed);
            $email_fields = self::get_fields_by_type($form, 'email');
            $selection_fields = GFCommon::get_selection_fields($form, $config['meta']['reg_condition_field_id']);
            // add custom option to password fields
            $password_default = $is_update_feed ? array(array('', __('Preserve current password', 'gravityformsuserregistration'))) : array(array('', __('Auto Generate Password', 'gravityformsuserregistration')));
            $password_fields = self::get_fields_by_type($form, 'password');
            // ? self::get_fields_by_type($form, 'password') : array();
            $password_fields = array_merge($password_fields, $password_default);
        }
        if (!empty($error_messages)) {
            ?>
            <div class="error">
                <p><?php 
            _e('Oops! There were some issues with your feed.', 'gravityformsuserregistration');
            ?>
</p>
                <ul><li><?php 
            echo implode('</li><li>', $error_messages);
            ?>
</li></ul>
            </div>
        <?php 
        }
        ?>

        <form method="post" action="" id="gf_user_form" class="<?php 
        echo rgars($config, 'meta/feed_type');
        ?>
">

            <input type="hidden" name="user_registration_setting_id" value="<?php 
        echo $id;
        ?>
" />
            <input type="hidden" name="gf_user_meta" id="gf_user_meta" value="" />
开发者ID:Inteleck,项目名称:hwc,代码行数:67,代码来源:userregistration.php

示例3: select_mailchimp_form

 public static function select_mailchimp_form()
 {
     check_ajax_referer("gf_select_mailchimp_form", "gf_select_mailchimp_form");
     $form_id = intval(rgpost("form_id"));
     list($list_id, $list_name) = explode("|:|", rgpost("list_id"));
     $setting_id = intval(rgpost("setting_id"));
     $api = self::get_api();
     if (!$api) {
         die("EndSelectForm();");
     }
     //getting list of all MailChimp merge variables for the selected contact list
     self::log("Retrieving Merge_Vars for list {$list_id}", "debug");
     $merge_vars = $api->listMergeVars($list_id);
     self::log("Merge_Vars retrieved: " . print_r($merge_vars, true), "debug");
     //getting configuration
     $config = GFMailChimpData::get_feed($setting_id);
     //getting field map UI
     $str = self::get_field_mapping($config, $form_id, $merge_vars);
     //getting list of selection fields to be used by the optin
     $form_meta = RGFormsModel::get_form_meta($form_id);
     $selection_fields = GFCommon::get_selection_fields($form_meta, rgars($config, "meta/optin_field_id"));
     $group_condition = array();
     $group_names = array();
     $grouping = self::get_groupings($config, $list_id, $selection_fields, $group_condition, $group_names);
     //fields meta
     $form = RGFormsModel::get_form_meta($form_id);
     die("EndSelectForm('" . str_replace("'", "\\'", $str) . "', " . GFCommon::json_encode($form) . ", '" . str_replace("'", "\\'", $grouping) . "', " . json_encode($group_names) . " );");
 }
开发者ID:hscale,项目名称:webento,代码行数:28,代码来源:mailchimp.php

示例4: edit_page


//.........这里部分代码省略.........
        foreach ($forms as $form) {
            echo '<option value="' . absint($form->id) . '" ' . selected(absint($form->id), $curr_form_id, false) . '>' . esc_html($form->title) . '</option>';
        }
        ?>
                </select>
                &nbsp;&nbsp;
                <span class="spinner" id="constantcontact_wait" style="display:none; float:none; position:absolute; margin-top: .33em;"></span>
            </div>
            <div id="constantcontact_field_group" valign="top" <?php 
        echo empty($config["meta"]["contact_list_id"]) || empty($config["form_id"]) ? "style='display:none;'" : "";
        ?>
>
                <div id="constantcontact_field_container" valign="top" class="margin_vertical_10" >
                    <label for="constantcontact_fields" class="left_header"><?php 
        _e("Map Fields", "gravity-forms-constant-contact");
        ?>
 <?php 
        gform_tooltip("constantcontact_map_fields");
        ?>
</label>

                    <div id="constantcontact_field_list">
                    <?php 
        $selection_fields = '';
        if (!empty($config["form_id"])) {
            //getting list of all ConstantContact merge variables for the selected contact list
            if (empty($merge_vars)) {
                $merge_vars = $api->listMergeVars($list_id);
            }
            //getting field map UI
            echo self::get_field_mapping($config, $config["form_id"], $merge_vars);
            //getting list of selection fields to be used by the optin
            $form_meta = RGFormsModel::get_form_meta($config["form_id"]);
            $selection_fields = GFCommon::get_selection_fields($form_meta, @$config["meta"]["optin_field_id"]);
        }
        ?>
                    </div>
                </div>

                <div id="constantcontact_optin_container" valign="top" class="margin_vertical_10">
                    <label for="constantcontact_optin" class="left_header"><?php 
        _e("Opt-In Condition", "gravity-forms-constant-contact");
        ?>
 <?php 
        gform_tooltip("constantcontact_optin_condition");
        ?>
</label>
                    <div id="constantcontact_optin">
                        <table>
                            <tr>
                                <td>
                                    <input type="checkbox" id="constantcontact_optin_enable" name="constantcontact_optin_enable" value="1" onclick="if(this.checked){jQuery('#constantcontact_optin_condition_field_container').show('slow');} else{jQuery('#constantcontact_optin_condition_field_container').hide('slow');}" <?php 
        echo @$config["meta"]["optin_enabled"] ? "checked='checked'" : "";
        ?>
/>
                                    <label for="constantcontact_optin_enable"><?php 
        _e("Enable", "gravity-forms-constant-contact");
        ?>
</label>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <div id="constantcontact_optin_condition_field_container" <?php 
        echo empty($config["meta"]["optin_enabled"]) ? "style='display:none'" : "";
        ?>
开发者ID:NerdyDillinger,项目名称:ovrride,代码行数:67,代码来源:constantcontact.php

示例5: edit_page


//.........这里部分代码省略.........
			</div>
			<div class="clear"></div>
			<div id="salesforce_field_group" <?php 
        echo empty($config["meta"]["contact_object_name"]) || empty($config["form_id"]) ? "style='display:none;'" : "";
        ?>
>
				<div id="salesforce_field_container" class="margin_vertical_10" >
					<h2><?php 
        _e('3. Map form fields to Salesforce fields.', "gravity-forms-salesforce");
        ?>
</h2>
					<h3 class="description"><?php 
        _e('About field mapping:', "gravity-forms-salesforce");
        ?>
</h3>
					<label for="salesforce_fields" class="left_header"><?php 
        _e("Standard Fields", "gravity-forms-salesforce");
        ?>
 <?php 
        gform_tooltip("salesforce_map_fields");
        ?>
</label>
					<div id="salesforce_field_list">
					<?php 
        if (!empty($config["form_id"])) {
            //getting list of all Salesforce merge variables for the selected contact list
            if (empty($merge_vars)) {
                $merge_vars = self::getFieldsForObject($config['meta']['contact_object_name']);
            }
            //getting field map UI
            echo self::get_field_mapping($config, $config["form_id"], $merge_vars);
            //getting list of selection fields to be used by the optin
            $form_meta = RGFormsModel::get_form_meta($config["form_id"]);
            $selection_fields = GFCommon::get_selection_fields($form_meta, $config["meta"]["optin_field_id"]);
        }
        ?>
					</div>
					<div class="clear"></div>
				</div>

				<?php 
        /** Manual Export - Bypass automatic export (since 2.6.0) */
        ?>
				<div id="salesforce_manual_export_container" class="margin_vertical_10">
					<table class="form-table">
						<tr valign="top">
							<th scope="row"><?php 
        esc_html_e('Disable Automatic Export', "gravity-forms-salesforce");
        ?>
 <?php 
        gform_tooltip("salesforce_manual_export");
        ?>
</th>
							<td>
								<fieldset>
									<legend class="screen-reader-text"><span><?php 
        _e('Disable Automatic Export', "gravity-forms-salesforce");
        ?>
</span></legend>
									<label for="salesforce_manual_export">
										<input name="salesforce_manual_export" type="checkbox" id="salesforce_manual_export" value="1" <?php 
        echo !empty($config['meta']['manual_export']) ? 'checked="checked"' : '';
        ?>
>
										<?php 
        esc_html_e('Entries will be sent to Salesforce when updated in the admin', "gravity-forms-salesforce");
开发者ID:AgilData,项目名称:WordPress-Skeleton,代码行数:67,代码来源:salesforce-api.php

示例6: get_routing_fields

 private static function get_routing_fields($form, $selected_field_id)
 {
     return GFCommon::get_selection_fields($form, $selected_field_id);
 }
开发者ID:novuscory,项目名称:ACH,代码行数:4,代码来源:notification.php

示例7: edit_page


//.........这里部分代码省略.........
            }
            // registration condition
            $config['meta']['reg_condition_enabled'] = RGForms::post('gf_user_registration_enabled');
            $config['meta']['reg_condition_field_id'] = RGForms::post('gf_user_registration_field_id');
            $config['meta']['reg_condition_operator'] = RGForms::post('gf_user_registration_operator');
            $config['meta']['reg_condition_value'] = RGForms::post('gf_user_registration_value');
            // additional meta options
            $config['meta']['notification'] = RGForms::post('gf_user_registration_notification');
            $config['meta']['set_post_author'] = RGForms::post('gf_user_registration_set_post_author');
            // use to save custom config options (used by BuddyPress)
            $config = apply_filters("gform_user_registration_save_config", $config);
            $is_validation_error = apply_filters("gform_user_registration_config_validation", false, $config);
            // validate and create/update feed
            if ($config["meta"]["email"] && $config["meta"]["username"] && !$is_validation_error) {
                $id = GFUserData::update_feed($id, $config["form_id"], $config["is_active"], $config["meta"]);
                ?>

                <div class="updated fade" style="padding:6px"><?php 
                echo sprintf(__("Feed Updated. %sback to list%s", "gravityformsuserregistration"), "<a href='?page=gf_user_registration'>", "</a>");
                ?>
</div>

                <?php 
            } else {
                $is_validation_error = true;
            }
        }
        $form = isset($config["form_id"]) && $config["form_id"] ? RGFormsModel::get_form_meta($config["form_id"]) : array();
        $form_fields = $email_fields = $selection_fields = $password_fields = array();
        if (!empty($form)) {
            $set_author_style = GFCommon::has_post_field($form['fields']) ? 'display:block' : 'display:none';
            $form_fields = self::get_form_fields($form);
            $email_fields = self::get_fields_by_type($form, 'email');
            $selection_fields = GFCommon::get_selection_fields($form, $config['meta']['reg_condition_field_id']);
            // add custom option to password fields
            $password_default = array(array('', __('Auto Generate Password', 'gravityformsuserregistration')));
            $password_fields = self::get_fields_by_type($form, 'password');
            $password_fields = array_merge($password_fields, $password_default);
        }
        ?>

        <form method="post" action="" id="gf_user_form">

            <input type="hidden" name="user_registration_setting_id" value="<?php 
        echo $id;
        ?>
" />
            <input type="hidden" name="gf_user_meta" id="gf_user_meta" value="" />
            <?php 
        wp_nonce_field('user_registration_edit_submit', 'user_registration_edit_submit');
        ?>

            <div class="margin_vertical_10<?php 
        echo $is_validation_error ? " user_registration_validation_error" : "";
        ?>
">
                <?php 
        if ($is_validation_error) {
            ?>
                    <span><?php 
            _e('Your Registration Feed could not be saved. Please update the errors below and re-save your feed.', 'gravityformsuserregistration');
            ?>
</span>
                    <?php 
        }
        ?>
开发者ID:hscale,项目名称:webento,代码行数:67,代码来源:userregistration.php

示例8: edit_page


//.........这里部分代码省略.........
        ?>
>
                <div id="exacttarget_field_container" valign="top" class="margin_vertical_10" >
                    <h2><?php 
        _e('3. Map form fields to ExactTarget attributes.', "gravity-forms-exacttarget");
        ?>
</h2>
                    <p class="description" style="margin-bottom:1em;"><?php 
        _e(sprintf('If you don&rsquo;t see an attribute listed, you need to create it in ExactTarget first under %sSubscribers > Profile Management%s.%sOnly mapped fields will be added to ExactTarget.', '<em style="font-style:normal;">', '</em>', '<br />'), "gravity-forms-exacttarget");
        ?>
</p>
                    <label for="exacttarget_fields" class="left_header"><?php 
        _e("Map Fields", "gravity-forms-exacttarget");
        ?>
 <?php 
        gform_tooltip("exacttarget_map_fields");
        ?>
 <span class="howto"><?php 
        _e(sprintf("%sRefresh fields%s", '<a href="' . add_query_arg('refresh', 'attributes') . '">', '</a>'), "gravity-forms-exacttarget");
        ?>
</span></label>

                    <div id="exacttarget_field_list">
                    <?php 
        if (!empty($config["form_id"])) {
            //getting list of all ExactTarget merge variables for the selected contact list
            if (empty($merge_vars)) {
                $merge_vars = $api->Attributes();
            }
            //getting field map UI
            echo self::get_field_mapping($config, $config["form_id"], $merge_vars);
            //getting list of selection fields to be used by the optin
            $form_meta = RGFormsModel::get_form_meta($config["form_id"]);
            $selection_fields = GFCommon::get_selection_fields($form_meta, $config["meta"]["optin_field_id"]);
        }
        ?>
                    </div>
                    <div class="clear"></div>
                </div>

                <div id="exacttarget_optin_container" valign="top" class="margin_vertical_10">
                    <label for="exacttarget_optin" class="left_header"><?php 
        _e("Opt-In Condition", "gravity-forms-exacttarget");
        ?>
 <?php 
        gform_tooltip("exacttarget_optin_condition");
        ?>
</label>
                    <div id="exacttarget_optin">
                        <table>
                            <tr>
                                <td>
                                    <input type="checkbox" id="exacttarget_optin_enable" name="exacttarget_optin_enable" value="1" onclick="if(this.checked){jQuery('#exacttarget_optin_condition_field_container').show('slow');} else{jQuery('#exacttarget_optin_condition_field_container').hide('slow');}" <?php 
        echo !empty($config["meta"]["optin_enabled"]) ? "checked='checked'" : "";
        ?>
/>
                                    <label for="exacttarget_optin_enable"><?php 
        _e("Enable", "gravity-forms-exacttarget");
        ?>
</label>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <div id="exacttarget_optin_condition_field_container" <?php 
        echo empty($config["meta"]["optin_enabled"]) ? "style='display:none'" : "";
开发者ID:thirdwunder,项目名称:Gravity-Forms-ExactTarget,代码行数:67,代码来源:exacttarget.php

示例9: edit_page


//.........这里部分代码省略.........

            <div class="clear"></div>
            <div id="marketo_field_group" valign="top" <?php 
        echo empty($config["form_id"]) ? "style='display:none;'" : "";
        ?>
>
                <div id="marketo_field_container" valign="top" class="margin_vertical_10" >
                    <h2><?php 
        _e('2. Map form fields to Marketo fields.', "gravity-forms-marketo");
        ?>
</h2>
                    <h3 class="description"><?php 
        _e('About field mapping:', "gravity-forms-marketo");
        ?>
</h2>
                    <label for="marketo_fields" class="left_header"><?php 
        _e("Standard Fields", "gravity-forms-marketo");
        ?>
 <?php 
        gform_tooltip("marketo_map_fields");
        ?>
</label>
                    <div id="marketo_field_list">
                    <?php 
        if (!empty($config["form_id"])) {
            //getting list of all Marketo merge variables for the selected contact list
            if (empty($merge_vars)) {
                $merge_vars = self::get_fields($config['meta']['contact_list_name']);
            }
            //getting field map UI
            echo self::get_field_mapping($config, $config["form_id"], $merge_vars);
            //getting list of selection fields to be used by the optin
            $form_meta = RGFormsModel::get_form_meta($config["form_id"]);
            $selection_fields = GFCommon::get_selection_fields($form_meta, $config["meta"]["optin_field_id"]);
            $tag_selection_fields = true;
        } else {
            $selection_fields = $tag_selection_fields = false;
        }
        ?>
                    </div>
                    <div class="clear"></div>
                </div>


                <div id="marketo_optin_container" valign="top" class="margin_vertical_10">
                    <label for="marketo_optin" class="left_header"><?php 
        _e("Opt-In Condition", "gravity-forms-marketo");
        ?>
 <?php 
        gform_tooltip("marketo_optin_condition");
        ?>
</label>
                    <div id="marketo_optin">
                        <table>
                            <tr>
                                <td>
                                    <input type="checkbox" id="marketo_optin_enable" name="marketo_optin_enable" value="1" onclick="if(this.checked){jQuery('#marketo_optin_condition_field_container').show('slow'); SetOptinCondition();} else{jQuery('#marketo_optin_condition_field_container').hide('slow');}" <?php 
        echo !empty($config["meta"]["optin_enabled"]) ? "checked='checked'" : "";
        ?>
/>
                                    <label for="marketo_optin_enable"><?php 
        _e("Enable", "gravity-forms-marketo");
        ?>
</label>
                                </td>
                            </tr>
开发者ID:emilysnothere,项目名称:Gravity-Forms-Marketo-Add-on,代码行数:67,代码来源:marketo.php


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