Have you ever had a regularly updated cheat sheet on a page or post, but you do not want to manually edit it anymore? I have edited my cheat sheets by hand for Black Friday event. I had to update deal lists several times per day, and that was a true nightmare.

Thus, I managed to find a more effective way to add an automatically updated cheat sheet. All I have to do is to create a submission form to input data, then the data will be automatically inserted into a table. This way can display data in a both stunning and convenient way. Let’s see how to do this!

Video Version:


Note:
You can use the way I introduce in this post to make various types of submission forms and cheat sheets for:

  • Customers’ / partners’ contact management
  • Documents / books listing
  • Tourist attractions listing
  • Staff’s information listing
  • Student profiles
  • etc

Preparation

You need to install the following tools:

  • Meta Box plugin: this is the framework that helps me create custom post types and custom fields. It’s available on wordpress.org.
  • MB Custom Post Types & Custom Taxonomies: this plugin is an extension of Meta Box. It gives us a visual interface on the backend to create a custom post type. This plugin is free and available on wordpress.org too. However, if you have bought premium bundles of Meta Box, this plugin is already available in the bundles.
  • Meta Box Builder: provide you with a visual interface to create custom fields.
  • MB Frontend Submission: display custom fields on the frontend to help users import data from the frontend.
  • MB Views: display values of the custom fields on the frontend.

Here all of the 3 tools, Meta Box Builder, MB Frontend Submission, and MB views, are the premium extensions of Meta Box. You will need to buy these plugins, or buy the bundles of Meta Box to get all of them at the best price.

In this post, I will use all of the mentioned tools to add a cheat sheet about the deals for Black Friday I have said. Each deal will have information like this:

  • Product Name
  • Product Type
  • Offer
  • Start Date
  • End Date
  • Promotion Code

Step 1: Create a New Custom Post Type

I need to add a new post type for the data we want to import into the table. Each of the deals will be a post of this post type.

At first, we create a new custom post type for the data which we want to input to the cheat sheet.

Step 2: Create a Submission Form for Importing Data

I will create a field group for the submission form. Each field will be used to import a type of the deal’s information I have said above.

Name of the Fields IDs of the Fields Field types
Your Product Name post_title text
Your Product Type product_type select_advanced
Your Offer offer text
Start Date start_date date
End Date end_date date
Promotion Code promotion_code text

Here I will use the post_title field to save product names as the title of the post.

Go to Meta Box > Custom Fields > Add New to create a new field group. Click Add Field and you will see many types of fields to choose. Just go ahead and get what you need.

 Click Add Field and you will see many types of fields to choose.

And these are the fields I have created.

Here is the fields I have created for the submission form.

In the Settings tab of this field group, I will choose the location as Post Type and assign these fields to the posts of the Deal post type.

choose the location is Post Type to assign the field to the post type you want

At this time, the fields will show up in the post editor like this:

The fields will show up in the post editor of the chosen post type. Then you can enter data for the cheat sheet here

If you or another employee in your company is in charge of importing data, you can set to import data directly from the backend. Otherwise, if you want other people to import data into your cheat sheet, you need to bring these fields to the frontend.

Step 3: Display the Submission Form on the Front End

We need plugin MB Frontend Submission to display the custom fields of this form to the frontend. This plugin will automatically generate a shortcode for the field group like this.

Use this shortcode to show the submission form on the frontend

You just need to put the shortcode into anywhere you want to display the submission form. I will place it into the content of a page like in the image below:

Insert the shortcode anywhere you want to put the submission form into

However, here I want to add some more things into my form, so I add some attributes to my shortcode like this:

[mb_frontend_form id="black-friday-deal" ajax="true" post_status="draft" recaptcha_key="your_key" recaptcha_secret="your_key"]

In this code:

  • black-friday-deal: Is the ID of the field group I have created in step 2;
  • ajax="true": Enable ajax loading;
  • recaptcha_key and recaptcha_secret: Google reCaptcha site key and secret key. I use it to avoid being spammed;
  • your_key: Fill in the corresponding keys of your Google reCaptcha here;
  • post_status="draft": I want the data to be censored before posting so I set up this post in “draft” status right after users have submitted.

And the custom fields of my submission form will show up on the frontend like this:

The custom fields of my submission form will show up on the frontend. So, you can input some data for the cheat sheet from frontend.

If you want to add more things to submission forms, you can add other attributes into the shortcode. You can see a list of addable attributes and a detailed instruction here.

Step 4: Style the Submission Form

If you want your form to display more beautifully, you can use CSS to style these fields.

Go to Customizer > Additional CSS and add some CSS like this:

.rwmb-form {
    background: #e2e8f0;
    padding: 24px;
    border-radius: 4px;
    max-width: 768px;
    margin: 0 auto;
}
.rwmb-form .rwmb-meta-box .rwmb-field {
    padding: 0 5px;
}
.rwmb-form .rwmb-field:not(:last-of-type) {
    margin: 0 0 12px;
}
.rwmb-form .rwmb-label,
.rwmb-form .rwmb-field .rwmb-input,
.rwmb-form .rwmb-field .select2-container {
    float: none;
    width: 100%;
    margin-bottom: 5px;
}
.rwmb-form button, .rwmb-form input {
    width: 100%;
}
.rwmb-form .rwmb-input input,
.rwmb-form .rwmb-input select {
    max-width: 100%;
}
.rwmb-form .select2-container .select2-selection--single,
.rwmb-form .select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 40px;
}
.rwmb-form .select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: 40px;
}

My submission form will turn to this appearance:

Use CSS to style the custom fields on the frontend

Step 5: Display Data into a Table on Frontend

Finally, all I need to do is to get the value of the custom fields in the submission form, and then display them into a table on my post using MB Views.

Go to Meta Box > Views > Add New, and add these codes:

{% set args = {post_type: 'deal', posts_per_page: -1, orderby: 'date', order: 'ASC' } %}
{% set posts = mb.get_posts( args ) %}

<table>
    <thead>
        <tr>
            <td>No.</td>
            <td>Name</td>
            <td>Type</td>
            <td>Offer</td>
            <td>Start</td>
            <td>End</td>
            <td>Code</td>
        </tr>
    </thead>
    <tbody>
        {% for p in posts %}
            <tr>
                <td>{{ loop.index }}</td>
                <td>{{ p.post_title }}</td>
                <td>{{ mb.rwmb_meta( 'your_product_type', '', p.ID ) }}</td>
                <td>{{ mb.rwmb_meta( 'your_offer', '', p.ID ) }}</td>
                <td>{{ mb.rwmb_meta( 'start_date', '', p.ID ) | date( 'Y-m-d' ) }}</td>
                <td>{{ mb.rwmb_meta( 'end_date', '', p.ID ) | date( 'Y-m-d' ) }}</td>
                <td>{{ mb.rwmb_meta( 'promotion_code', '', p.ID ) }}</td>
            </tr>
        {% endfor %}
    </tbody>
</table>

In these lines of code, I use a custom query which is get_posts. The attributes such as post_title , your_product_type , your_offer , … are IDs of custom fields.

In the Settings section of this view, I choose Shortcode as the Type, so that I can use a shortcode to add this table into my post.

In the Settings section of this view, I choose Shortcode as the Type.

I place the shortcode into the content of the post like this:

Insert the shortcode to show up custom fields values to anywhere you want

This is all of the post content on the frontend with a deal list:

Here is the cheat sheet with all the data we input into the submission form

So I have finished my cheat sheet! When someone imports data to the submission form, the data will be saved in a post having Deal post type and “draft” status. If I review and approve this content, it will turn to “Published”. At this time, information about the deal will show up right on my post.

Tutorial Video

Last Words

I hope that you can easily imagine and conduct importing and displaying data automatically with this tutorial. As I have said, this method can work well in many cases. If you try it successfully, please share your result with everyone in the comment section. Don’t forget to follow our upcoming tutorials as well! Good luck to you!

Other case studies you might be interested in

  1. Create A Dynamic Landing Page in WordPress Using Custom Field
  2. Create a Filter to Find Hotels by Location
  3. Create an OTA Website Like Booking.com with Meta Box Plugin - P1: Create a Page to Introduce Hotel Rooms
  4. Create an OTA Website Like Booking.com with Meta Box Plugin - P2: Create Filters on the Archive Page
  5. Create an OTA Website Like Booking.com with Meta Box Plugin - P3: Create Filters for Single Hotel Pages
  6. Create Dynamic Favicon in WordPress using Meta Box plugin
  7. Create Posts Series in WordPress Using Meta Box
  8. Display The Latest Products Section - P2 - Using Meta Box and Elementor
  9. Display The Latest Products Section - P3 - Using Meta Box And Oxygen
  10. How to Add Custom Fields for WooCommerce - P2 - Using MB Views
  11. How to Add Custom Fields to Display Banners using Meta Box Plugin
  12. How to Add Guest Authors and Guest Posts - Using Meta Box
  13. How to Add Related Posts - Using Custom Fields
  14. How to Build a Hotel Booking Website Using Meta Box - P1
  15. How to Build a Hotel Booking Website Using Meta Box - P2 - Booking Page in Backend
  16. How to Build a Hotel Booking Website Using Meta Box - P4 - Booking Management Page
  17. How to Build a Hotel Booking Website Using Meta Box – P3 – Booking Page for Customer
  18. How to Create a Classified Ads Website using Meta Box
  19. How to create a FAQs page - P5 - Using Meta Box and Breakdance
  20. How to Create a Product Page - P2 - Using Meta Box and Oxygen
  21. How to Create a Product Page - P3 - Using Meta Box and Bricks
  22. How to Create a Product Page - P4 - Using Meta Box and Elementor
  23. How to Create a Product Page - P5 - Using Meta Box and Gutenberg
  24. How to Create a Product Page - P6 -Using Meta Box and Breakdance
  25. How to Create a Product Page - P7 - Using Meta Box + Kadence
  26. How to Create a Product Page - P8 - Using Meta Box and Brizy
  27. How to Create a Product Page - P9 - Using Meta Box and Divi
  28. How to Create a Product Page using Meta Box Plugin
  29. How to Create a Recipe - P2 - Using Meta Box and Oxygen
  30. How to Create a Recipe - P3 - Using Meta Box and Elementor
  31. How to Create a Recipe - P4 - Using Meta Box and Bricks
  32. How to Create a Recipe - P5 - Using Meta Box and Zion
  33. How to Create a Recipe - P6 - Using Meta Box and Brizy
  34. How to Create a Recipe - P7 - Using Meta Box and Breakdance
  35. How to Create a Recipe - P8 - Using Meta Box and Kadence
  36. How to Create a Recipe - P9 - Using Meta Box and Divi
  37. How to Create a Recipe with Meta Box Plugin
  38. How to Create a Simple Listing - P2 - Using Meta Box and Bricks
  39. How to Create a Simple Listing - P3 - Using Meta Box and Breakdance
  40. How to Create a Simple Listing - P4 - Using Meta Box and Elementor
  41. How to Create a Team Members Page - P1- Using Meta Box and Elementor
  42. How to Create a Team Members Page - P2 - Using Meta Box and Oxygen
  43. How to Create a Team Members Page - P3 - Using Meta Box and Bricks
  44. How to Create a Team Members Page - P4 - Just Meta Box
  45. How to Create a Team Members Page - P6 - using Meta Box and Breakdance
  46. How to Create a Team Members Page - P7 - Using Meta Box and Kadence
  47. How to Create a Video Gallery Page - P2 - Using Meta Box + Bricks
  48. How to Create a Video Gallery Page - P3 - Using Meta Box and Breakdance
  49. How to Create a Video Gallery Page - P4 - Using Meta Box + Elementor
  50. How to Create a Video Gallery Page - P5 - Using MB Views
  51. How to Create a Video Gallery Page - P6 - Using Meta Box and Zion
  52. How to Create a Video Gallery Page Using Meta Box + Oxygen
  53. How to Create ACF Flexible Content Field with Meta Box
  54. How to Create an Auto-Updated Cheat Sheet in WordPress
  55. How to Create an FAQs Page - P1 - Using Meta Box and Elementor
  56. How to create an FAQs page - P2 - Using Meta Box and Oxygen
  57. How to create an FAQs page - P4 - Using Meta Box and Bricks
  58. How to Create an FAQs Page - P6 - Using MB Views
  59. How to Create an FAQs Page - P7 - Using Meta Box and Divi
  60. How to Create an FAQs Page - P8 - Using Meta Box and Kadence
  61. How to Create an FAQs Page -P3- Using Meta Box
  62. How to Create Buttons with Dynamic Link using Custom Fields
  63. How to Create Category Thumbnails & Featured Images Using Custom Fields
  64. How to Create Download and Preview Buttons - P1 - Using Meta Box and Bricks
  65. How to Create Download and Preview Buttons - P2 - Using Meta Box and Oxygen
  66. How to Create Download and Preview Buttons - P3 - Using MB Views
  67. How to Create Download Buttons in WordPress - Using Custom Fields
  68. How to Create Dynamic Landing Page in WordPress - P1 - Using Meta Box and Elementor
  69. How to Create Dynamic Landing Page in WordPress - P2 - Using Meta Box and Bricks
  70. How to Create Menus for Restaurants - P1 - Using Meta Box and Elementor
  71. How to Create Menus for Restaurants - P2- Using Meta Box and Bricks
  72. How to Create Notification Using Custom HTML Field
  73. How to Create Online Admission Form for School or University
  74. How to Create Online Reservation Form for Restaurants using Meta Box
  75. How to Create Relationships - P1 - Using Meta Box and Oxygen
  76. How to Create Relationships - P2 - Using Meta Box and Bricks
  77. How to Create Relationships - P3 - Using MB Views
  78. How to Create Relationships - P4 - Using Meta Box and Breakdance
  79. How to Create Taxonomy Thumbnails & Featured Images - P2 - Using Meta Box and Oxygen
  80. How to Create Taxonomy Thumbnails & Featured Images - P3 - Using Meta Box and Bricks
  81. How to Create Taxonomy Thumbnails & Featured Images - P4 - Using MB Views
  82. How to Create YouTube Video Timestamps on WordPress Website - P1 - Using MB Views
  83. How To Display All Listings On A Map With Meta Box
  84. How to Display Author Bio in WordPress - P1 - Using Meta Box and Bricks
  85. How to Display Images from Cloneable Fields - P1 - with Gutenberg
  86. How to Display Images from Cloneable Fields - P2 - Using Meta Box and Oxygen
  87. How to Display Images from Cloneable Fields - P3 - with Elementor
  88. How to Display Images from Cloneable Fields - P4 - with Bricks
  89. How to Display Opening Hours for Restaurants - P1 - Using Meta Box + Gutenberg
  90. How to Display Opening Hours for Restaurants - P2 - Using Meta Box and Oxygen
  91. How to Display Product Variations - P1 - Using Meta Box and Gutenberg
  92. How to Display Product Variations - P2 - Using Meta Box and Oxygen
  93. How to Display Product Variations - P3 - Using Meta Box and Bricks
  94. How to Display the Dynamic Banners - P2 - Using Meta Box and Bricks
  95. How to Display The Latest Products - P5 - Using Meta Box and Bricks
  96. How to Display the Latest Products - P6 - using Meta Box and Breakdance
  97. How to Display the Latest Products - P7 - Using Meta Box + Kadence
  98. How to Display the Latest Products Section - P4 - Using Meta Box + Zion
  99. How to Display the Most Viewed Posts - P1 - using MB Views

Leave a Reply

Your email address will not be published. Required fields are marked *