This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
Single Post Template: Reports | |
Description: This part is optional, but helpful for describing the Post Template | |
*/ | |
global $prefix; | |
wp_head(); ?> | |
<table id="download"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
Single Tag Template: Fronter | |
Description: This part is optional, but helpful for describing the Post Template | |
*/ | |
global $prefix; | |
wp_head(); ?> | |
<body style="padding: 50px;"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
Title: Employee Information | |
Description: This area is for administrative purposes | |
Capability: manage_options | |
*/ | |
// Let's create a text box field | |
piklist('field', array( | |
'type' => 'text' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{"type":"form","data":{"fields":[{"id":"section-1","element_id":"section-1","form_id":"wrapper-1537827779502-1868","condition_action":"show","condition_rule":"any","conditions":[],"type":"section","options":[],"cols":12,"section_title":"Project Leader","section_border":"false","section_subtitle":"","custom-class":"","wrapper_id":"wrapper-1537827779502-1868"},{"id":"name-1","element_id":"name-1","form_id":"wrapper-1511347711918-1669","condition_action":"show","condition_rule":"any","conditions":[],"type":"name","cols":4,"required":"true","field_label":"Project Leader Name","placeholder":"E.g. John","prefix_label":"Prefix","fname_label":"First Name","fname_placeholder":"E.g. John","mname_label":"Middle Name","mname_placeholder":"E.g. Smith","lname_label":"Last Name","lname_placeholder":"E.g. Doe","prefix_description":"","fname_description":"","mname_description":"","lname_description":"","description":"","custom-class":"","wrapper_id":"wrapper-1511347711918-1669"},{"id":"email-1","element_id":"email-1","form_id |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
Plugin Name: Forminator Recent Entries Dashboard Widget | |
Plugin URI: https://premium.wpmudev.org/project/forminator-pro/ | |
Description: Display Forminator Form Entries in WordPress Dashboard Widget | |
Version: 0.1 | |
Author: Cvetan Cvetanov | |
Author URI: https://premium.wpmudev.org/profile/cvetan | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public function reset_options() { | |
// Fetch ALL dashboard widget options from the db... | |
$opts = get_option( 'dashboard_widget_options' ); | |
//Get just our widget's options, or set default | |
unset( $opts[ __CLASS__ ] ); | |
// update option | |
return update_option( 'dashboard_widget_options', $opts ); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public function update_options( $options = array() ) { | |
// Fetch all dashboard widget options from the db... | |
$opts = get_option( 'dashboard_widget_options' ); | |
//Get just our widget's options, or set empty array | |
$forminator_options = ( isset( $opts[ __CLASS__ ] ) ) ? $opts[ __CLASS__ ] : array(); | |
// merge old one with new one | |
$opts[ __CLASS__ ] = array_merge( $forminator_options, $options ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public function configure() { | |
// Check if user allowed to view the widget | |
if ( ! $this->user_allowed() ) { | |
echo esc_html( __( 'You are not allowed to view this widget content' ) ); | |
} else { | |
$options = $this->get_options( $this->get_default_options() ); | |
$post_data = $_POST; | |
if ( isset( $post_data['id'] ) ) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public function render_form_submissions( $form, $entries ) { | |
$field_labels = array(); | |
// Get fields labels | |
if ( ! is_null( $form ) ) { | |
if ( is_array( $form->fields ) ) { | |
foreach ( $form->fields as $field ) { | |
$field_labels[ $field->slug ] = $field->get_label_for_entry(); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
protected function get_submissions() { | |
// Check if we have configured form ID else return | |
if ( empty( $this->id ) ) { | |
echo esc_html( __( 'Please configure which form to display its submissions.' ) ); | |
return false; | |
} | |
$module = null; | |
$entries = array(); |