public static function switch_form_box()
 {
     global $post_type_object;
     if (!$post_type_object or $post_type_object->name != 'frm_display') {
         return;
     }
     $form_id = isset($_GET['form']) ? $_GET['form'] : '';
     echo FrmFormsHelper::forms_dropdown('form', $form_id, __('View all forms', 'formidable'));
 }
 public static function switch_form_box()
 {
     global $post_type_object;
     if (!$post_type_object || $post_type_object->name != self::$post_type) {
         return;
     }
     $form_id = FrmAppHelper::simple_get('form', 'absint');
     echo FrmFormsHelper::forms_dropdown('form', $form_id, array('blank' => __('View all forms', 'formidable')));
 }
Пример #3
0
    public function form($instance)
    {
        //Defaults
        $instance = wp_parse_args((array) $instance, array('title' => false, 'form' => false, 'description' => false));
        ?>
	<p><label for="<?php 
        echo esc_attr($this->get_field_id('title'));
        ?>
"><?php 
        _e('Title', 'formidable');
        ?>
:</label><br/>
	<input type="text" class="widefat" id="<?php 
        echo esc_attr($this->get_field_id('title'));
        ?>
" name="<?php 
        echo esc_attr($this->get_field_name('title'));
        ?>
" value="<?php 
        echo esc_attr(stripslashes($instance['title']));
        ?>
" /></p>

	<p><label for="<?php 
        echo esc_attr($this->get_field_id('form'));
        ?>
"><?php 
        _e('Form', 'formidable');
        ?>
:</label><br/>
<?php 
        FrmFormsHelper::forms_dropdown($this->get_field_name('form'), $instance['form'], array('blank' => false, 'field_id' => $this->get_field_id('form'), 'class' => 'widefat'));
        ?>
	</p>

	<p><label for="<?php 
        echo esc_attr($this->get_field_id('description'));
        ?>
"><input class="checkbox" type="checkbox" <?php 
        checked($instance['description'], true);
        ?>
 id="<?php 
        echo esc_attr($this->get_field_id('description'));
        ?>
" name="<?php 
        echo esc_attr($this->get_field_name('description'));
        ?>
" value="1" />
	<?php 
        _e('Show Description', 'formidable');
        ?>
</label></p>
<?php 
    }
Пример #4
0
                                        echo FrmAppHelper::esc_textarea($field['description']);
                                    }
                                    ?>
</textarea>
</td>
</tr>
<?php 
                                } else {
                                    if ($field['type'] == 'form') {
                                        ?>
<tr><td><?php 
                                        _e('Insert Form', 'formidable');
                                        ?>
</td>
<td><?php 
                                        FrmFormsHelper::forms_dropdown('field_options[form_select_' . $field['id'] . ']', $field['form_select'], array('exclude' => $field['form_id']));
                                        ?>
</td>
</tr>

<?php 
                                    } else {
                                        if ($field['type'] == 'phone') {
                                            ?>
<tr>
<td><label><?php 
                                            _e('Format', 'formidable');
                                            ?>
</label>
<span class="frm_help frm_icon_font frm_tooltip_icon" title="<?php 
                                            esc_attr_e('Insert the format you would like to accept. Use a regular expression starting with ^ or an exact format like (999)999-9999.', 'formidable');
Пример #5
0
    function form($instance)
    {
        //Defaults
        $instance = wp_parse_args((array) $instance, array('title' => false, 'form' => false, 'description' => false, 'size' => 20, 'select_width' => false));
        ?>
	<p><label for="<?php 
        echo $this->get_field_id('title');
        ?>
"><?php 
        _e('Title', 'formidable');
        ?>
:</label>
	<input type="text" class="widefat" id="<?php 
        echo $this->get_field_id('title');
        ?>
" name="<?php 
        echo $this->get_field_name('title');
        ?>
" value="<?php 
        echo esc_attr(stripslashes($instance['title']));
        ?>
" /></p>
	
	<p><label for="<?php 
        echo $this->get_field_id('form');
        ?>
"><?php 
        _e('Form', 'formidable');
        ?>
:</label>
	    <?php 
        FrmFormsHelper::forms_dropdown($this->get_field_name('form'), $instance['form'], false, $this->get_field_id('form'));
        ?>
	</p>
	
	<p><label for="<?php 
        echo $this->get_field_id('description');
        ?>
"><input class="checkbox" type="checkbox" <?php 
        checked($instance['description'], true);
        ?>
 id="<?php 
        echo $this->get_field_id('description');
        ?>
" name="<?php 
        echo $this->get_field_name('description');
        ?>
" value="1" />
	<?php 
        _e('Show Description', 'formidable');
        ?>
</label></p>
	
	<p><label for="<?php 
        echo $this->get_field_id('select_width');
        ?>
"><input class="checkbox" type="checkbox" <?php 
        checked($instance['select_width'], true);
        ?>
 id="<?php 
        echo $this->get_field_id('select_width');
        ?>
" name="<?php 
        echo $this->get_field_name('select_width');
        ?>
" value="1" />
	<?php 
        _e('Fit Select Boxes into SideBar', 'formidable');
        ?>
</label></p>
	
	<p><label class="checkbox" for="<?php 
        echo $this->get_field_id('size');
        ?>
"><?php 
        _e('Field Size', 'formidable');
        ?>
:</label>
	
	<input type="text" size="3" id="<?php 
        echo $this->get_field_id('size');
        ?>
" name="<?php 
        echo $this->get_field_name('size');
        ?>
" value="<?php 
        echo esc_attr($instance['size']);
        ?>
" /> <span class="howto" style="display:inline;"><?php 
        _e('characters wide', 'formidable');
        ?>
</span></p>
	<p class="description"><?php 
        _e('If your text fields are too big for your sidebar insert a size here.', 'formidable');
        ?>
</p>
<?php 
    }
Пример #6
0
</th>
                        <td>
                            <input type="text" name="csv_del" value="<?php 
        echo esc_attr($csv_del);
        ?>
" />
                        </td>
                    </tr>

                    <tr class="form-field">
                        <th valign="top" scope="row"><?php 
        _e('Import Into Form', 'formidable');
        ?>
</th>
                        <td><?php 
        FrmFormsHelper::forms_dropdown('form_id', $form_id, true, false);
        ?>
</td>
                    </tr>
                    
                </table>
                <?php 
    } else {
        if ($step == 'Two') {
            ?>
                    <input type="hidden" name="step" value="import" />
                    <input type="hidden" name="csv" value="<?php 
            echo $media_id;
            ?>
" />
                    <input type="hidden" name="row" value="<?php 
Пример #7
0
    <style>
    #frm_popup_content h3{
        color:#5A5A5A;
        font-family:Georgia,"Times New Roman",Times,serif;
        font-weight:normal;
        font-size:1.6em;
    }
    </style>
    <div class="wrap" id="frm_popup_content">
    <h3><?php 
_e("Select a form to insert", "formidable");
?>
</h3>
    
    <p><?php 
FrmFormsHelper::forms_dropdown('frm_add_form_id');
?>
</p>

    <p><input type="checkbox" id="frm_display_title" /> <label for="frm_display_title"><?php 
_e("Display form title", "formidable");
?>
</label> &nbsp; &nbsp;
        <input type="checkbox" id="frm_display_description" /> <label for="frm_display_description"><?php 
_e("Display form description", "formidable");
?>
</label>
    </p>
    
    <p><input type="button" class="button-primary" value="Insert Form" onclick="frm_insert_form();" /></p>
        
Пример #8
0
_e('Update', 'formidable');
?>
" class="button-primary" />
            <?php 
_e('or', 'formidable');
?>
            <a class="button-secondary cancel" href="?page=formidable<?php 
echo $values['is_template'] ? '-templates' : '';
?>
"><?php 
_e('Cancel', 'formidable');
?>
</a>
            <span style="margin-left:8px;">
            <?php 
FrmFormsHelper::forms_dropdown('frm_switcher', '', __('Switch Form', 'formidable'), false, "frmAddNewForm(this.value,'edit')");
?>
            </span>
        </p>
        
        <input type="hidden" name="frm_action" value="update" />
        <input type="hidden" name="action" value="update" />
        <input type="hidden" name="id" value="<?php 
echo $id;
?>
" />
        <?php 
wp_nonce_field('update-options');
?>

        <?php 
Пример #9
0
    function before_table($footer, $form_id = false)
    {
        if ($footer) {
            return;
        }
        if ($_GET['page'] == 'formidable-entries') {
            ?>
            <div class="alignleft actions">
            <?php 
            FrmFormsHelper::forms_dropdown('frm_redirect_to_list', '', __('Switch Form', 'formidable'), false, "frmRedirectToForm(this.value,'list')");
            ?>
            </div>
            <?php 
            if ($form_id) {
                if (current_user_can('frm_create_entries')) {
                    ?>
                <div class="alignleft"><a href="?page=formidable-entries&amp;frm_action=new&amp;form=<?php 
                    echo $form_id;
                    ?>
" class="button-secondary"><?php 
                    _e('Add New Entry to this form', 'formidable');
                    ?>
</a></div>
            <?php 
                }
            }
        } else {
            if ($_GET['page'] == 'formidable-entry-templates' and $form_id) {
                ?>
            <div class="alignleft actions">
            <?php 
                FrmFormsHelper::forms_dropdown('frm_redirect_to_list', '', __('Switch Form', 'formidable'), false, "frmRedirectToDisplay(this.value,'list')");
                ?>
            </div>
        <?php 
            }
        }
    }
Пример #10
0
                <div class="clear"></div>
                </div>
            </form>
            </div>

        </div>
    <?php 
} else {
    FrmAppController::get_form_nav($form->id, true);
    ?>
        <form method="get" class="frm_no_print">
            <input type="hidden" name="frm_action" value="show" />
            <input type="hidden" name="page" value="formidable-reports" />
            <p><?php 
    FrmFormsHelper::forms_dropdown('form', '', __('Switch Form', 'formidable'));
    ?>
            <input type="submit" class="button-secondary" value="<?php 
    _e('Go', 'formidable');
    ?>
" /></p>
        </form>

        <div id="chart_time"></div>
        <div id="img_chart_time" class="frm_print_graph"></div>
        <?php 
    foreach ($fields as $field) {
        ?>
            <div style="margin-top:25px;">
            <div class="alignleft"><div id="chart_<?php 
        echo $field->id;
Пример #11
0
<table class="form-table">
    <tr class="form-field">
        <td class="frm_left_label"><?php 
_e('Use Entries from Form', 'formidable');
?>
</td>
        <td><?php 
FrmFormsHelper::forms_dropdown('form_id', $post->frm_form_id, array('inc_children' => 'include'));
?>
        </td>
    </tr>
    <tr>
        <td><?php 
_e('View Format', 'formidable');
?>
</td>
        <td>
            <fieldset>
            <p><label for="all"><input type="radio" value="all" id="all" <?php 
checked($post->frm_show_count, 'all');
?>
 name="show_count" /> <?php 
_e('All Entries &mdash; list all entries in the specified form', 'formidable');
?>
.</label></p>
            <p><label for="one"><input type="radio" value="one" id="one" <?php 
checked($post->frm_show_count, 'one');
?>
 name="show_count" /> <?php 
_e('Single Entry &mdash; display one entry', 'formidable');
?>
Пример #12
0
            <div style="font-size:15px;background:transparent;" class="search"><?php 
_e('Add New Entry', 'formidable');
?>
</div>
        </div></div>

        <form method="get">
            <div id="post-body">
            <p><?php 
_e('Select a form for your new entry.', 'formidable');
?>
</p>
            <input type="hidden" name="frm_action" value="new" />
            <input type="hidden" name="page" value="formidable-entries" />
            <?php 
FrmFormsHelper::forms_dropdown('form', '', array('blank' => false));
?>
<br/>
            </div>
            <div id="nav-menu-footer">
				<div class="major-publishing-actions">
					<input type="submit" class="button-primary" value="<?php 
esc_attr_e('Go', 'formidable');
?>
" />
				</div>

            <div class="clear"></div>
            </div>
        </form>
        </div>
Пример #13
0
]" style="width:98%;" rows="8"><?php 
                                    echo FrmAppHelper::esc_textarea($field['description']);
                                    ?>
</textarea>
</td>
</tr>
<?php 
                                } else {
                                    if ($field['type'] == 'form') {
                                        ?>
<tr><td><?php 
                                        _e('Insert Form', 'formidable');
                                        ?>
</td>    
<td><?php 
                                        FrmFormsHelper::forms_dropdown('field_options[form_select_' . $field['id'] . ']', $field['form_select'], true);
                                        ?>
</td>

<tr><td><?php 
                                        _e('Maximum Duplication', 'formidable');
                                        ?>
</td>    
<td><input type="text" name="field_options[duplication_<?php 
                                        $field['id'];
                                        ?>
]" value="<?php 
                                        echo esc_attr($field['duplication']);
                                        ?>
" size="3"/> <span class="howto"><?php 
                                        _e('The number of times the end user is allowed to duplicate this section of fields in one entry', 'formidable');
Пример #14
0
<table class="form-table">
    <tr class="form-field">
        <td class="frm_left_label"><?php 
_e('Use Entries from Form', 'formidable');
?>
</td>
        <td><?php 
FrmFormsHelper::forms_dropdown('form_id', $post->frm_form_id, true, false, "frmDisplayFormSelected(this.value)");
?>
        </td>
    </tr>
    <tr>
        <td><?php 
_e('View Format', 'formidable');
?>
</td>
        <td>
            <fieldset>
            <p><label for="all"><input type="radio" value="all" id="all" <?php 
checked($post->frm_show_count, 'all');
?>
 name="show_count" onchange="javascript:frm_show_count(this.value)" /> <?php 
_e('All Entries &mdash; list all entries in the specified form', 'formidable');
?>
.</label></p>
            <p><label for="one"><input type="radio" value="one" id="one" <?php 
checked($post->frm_show_count, 'one');
?>
 name="show_count" onchange="javascript:frm_show_count(this.value)" /> <?php 
_e('Single Entry &mdash; display one entry', 'formidable');
?>
Пример #15
0
</div>

<div class="postbox ">
<h3 class="hndle"><span><?php 
_e('Form and Display Type', 'formidable');
?>
</span></h3>
<div class="inside">
<table class="form-table">
    <tr class="form-field">
        <th valign="top" scope="row"><?php 
_e('Use Entries from Form', 'formidable');
?>
</th>
        <td><?php 
FrmFormsHelper::forms_dropdown('form_id', $values['form_id'], true, false, "frmDisplayFormSelected(this.value,'{$frm_ajax_url}')");
?>
            <span id="entry_select_container">
                <?php 
if (is_numeric($values['form_id'])) {
    _e('Select Entry', 'formidable') . ': ' . FrmEntriesHelper::entries_dropdown($values['form_id'], 'entry_id', $values['entry_id'], true, __('The first one depending on the Order specified below', 'formidable'));
}
?>
            </span>
        </td>
    </tr>
    <tr class="form-field">
        <th valign="top" scope="row"><?php 
_e('Display Format', 'formidable');
?>
</th>
Пример #16
0
<?php

if (!empty($form_id)) {
    ?>
    <h4 class="frm_left_label"><?php 
    _e('Select a form:', 'formidable');
    ?>
</h4>
	<?php 
    FrmFormsHelper::forms_dropdown('frmsc_' . $shortcode . '_' . $form_id);
    ?>
    <div class="frm_box_line"></div>
<?php 
}
if (!empty($opts)) {
    ?>
    <h4><?php 
    _e('Options', 'formidable');
    ?>
</h4>
    <ul>
<?php 
    foreach ($opts as $opt => $val) {
        if (isset($val['type']) && 'text' == $val['type']) {
            ?>
		<li>
			<label class="setting" for="frmsc_<?php 
            echo esc_attr($shortcode . '_' . $opt);
            ?>
">
				<span><?php 
Пример #17
0
            <div style="font-size:15px;background:transparent;" class="search"><?php 
_e('Add New Entry', 'formidable');
?>
</div>
        </div></div>

        <form method="get">
            <div id="post-body">
            <p><?php 
_e('Select a form for your new entry.', 'formidable');
?>
</p>
            <input type="hidden" name="frm_action" value="new" />
            <input type="hidden" name="page" value="formidable-entries" />
            <?php 
FrmFormsHelper::forms_dropdown('form', '', false);
?>
<br/>
            </div>
            <div id="nav-menu-footer">
            <div class="major-publishing-actions"><input type="submit" class="button-primary" value="<?php 
_e('Go', 'formidable');
?>
" /></div>

            <div class="clear"></div>
            </div>
        </form>
        </div>

    </div>