<?php

if (!defined('IPHORM_VERSION')) {
    exit;
}
$dateFormats = iphorm_get_date_formats();
$timeFormats = iphorm_get_time_formats();
?>
<select class="ifb-insert-variable-preprocess" onchange="iPhorm.insertVariable('#default_value_<?php 
echo $id;
?>
', this);">
	<option value=""><?php 
esc_html_e('Insert variable...', 'iphorm');
?>
</option>
	<option value="{ip}"><?php 
esc_html_e('User IP address', 'iphorm');
?>
</option>
	<option value="{post_id}"><?php 
esc_html_e('Form post/page ID', 'iphorm');
?>
</option>
	<option value="{post_title}"><?php 
esc_html_e('Form post/page title', 'iphorm');
?>
</option>
	<option value="{url}"><?php 
esc_html_e('Form URL', 'iphorm');
?>
Exemple #2
0
/**
 * Localisation function to pass translations and other data to
 * the admin JavaScript
 *
 * @return array
 */
function iphorm_admin_l10n()
{
    $data = array('captcha_url' => iphorm_plugin_url() . '/includes/captcha.php', 'preview_url' => admin_url('?iphorm_preview=1'), 'tmp_dir' => iphorm_get_temp_dir(), 'admin_images_url' => iphorm_admin_url() . '/images', 'months' => iphorm_get_all_months(), 'date_formats' => iphorm_get_date_formats(), 'time_formats' => iphorm_get_time_formats(), 'error_adding_element' => __('Error adding the element', 'iphorm'), 'confirm_delete_element' => __('Are you sure you want to delete this element? Any associated entry data for this element will also be deleted.', 'iphorm'), 'confirm_convert_element' => __('Are you sure you want to convert this element? Most of your settings will be copied over, however you may lose some settings that are not shared between the element types.', 'iphorm'), 'error_saving_form' => __('Error saving the form', 'iphorm'), 'element_deleted' => __('Element deleted', 'iphorm'), 'option_1' => __('Option 1', 'iphorm'), 'option_2' => __('Option 2', 'iphorm'), 'option_3' => __('Option 3', 'iphorm'), 'at_least_one_option' => __('There must be at least one option', 'iphorm'), 'error_adding_filter' => __('Error adding the filter', 'iphorm'), 'error_adding_validator' => __('Error adding the validator', 'iphorm'), 'error_adding_style' => __('Error adding the style', 'iphorm'), 'insert_variable' => _x('Insert variable...', 'variable piece of data', 'iphorm'), 'submitted_form_value' => __('Submitted form value', 'iphorm'), 'user_ip_address' => __('User IP address', 'iphorm'), 'form_post_page_id' => __('Form post/page ID', 'iphorm'), 'form_post_page_title' => __('Form post/page title', 'iphorm'), 'entry_id' => __('Entry ID', 'iphorm'), 'form_url' => __('Form URL', 'iphorm'), 'user_display_name' => __('User display name', 'iphorm'), 'user_email' => __('User email', 'iphorm'), 'user_login' => _x('User login', 'username', 'iphorm'), 'referring_url' => __('Referring URL', 'iphorm'), 'date_select_format' => __('Date (select a format)', 'iphorm'), 'time_select_format' => __('Time (select a format)', 'iphorm'), 'send_to_email' => __('Send to', 'iphorm'), 'conditional_if' => _x('if', 'conditional', 'iphorm'), 'is_equal_to' => __('is equal to', 'iphorm'), 'is_not_equal_to' => __('is not equal to', 'iphorm'), 'day' => __('Day', 'iphorm'), 'month' => __('Month', 'iphorm'), 'year' => __('Year', 'iphorm'), 'example_tooltip' => __('This is an example tooltip!', 'iphorm'), 'more_information' => __('More information', 'iphorm'), 'remove' => _x('Remove', 'delete', 'iphorm'), 'hh_string' => _x('HH', 'select hour', 'iphorm'), 'mm_string' => _x('MM', 'select minute', 'iphorm'), 'ampm_string' => _x('am/pm', 'select morning/afternoon', 'iphorm'), 'am_string' => _x('am', 'time, morning', 'iphorm'), 'pm_string' => _x('pm', 'time, evening', 'iphorm'), 'add_bulk_options' => __('Add bulk options', 'iphorm'), 'bulk_options' => iphorm_get_bulk_options(), 'need_multi_element' => __('The form must have at least one Dropdown Menu, Checkboxes or Multiple Choice element to use this feature.', 'iphorm'), 'this_group_if' => __('this group if', 'iphorm'), 'this_field_if' => __('this field if', 'iphorm'), 'show' => __('Show', 'iphorm'), 'hide' => __('Hide', 'iphorm'), 'all' => __('all', 'iphorm'), 'any' => __('any', 'iphorm'), 'these_rules_match' => __('of these rules match:', 'iphorm'), 'is' => __('is', 'iphorm'), 'is_not' => __('is not', 'iphorm'), 'unsaved_changes' => __('You have unsaved changes.', 'iphorm'));
    $params = array('l10n_print_after' => 'iphormL10n = ' . iphorm_json_encode($data) . ';');
    return $params;
}