Title: Nested Shortcode support?
Last modified: April 7, 2021

---

# Nested Shortcode support?

 *  Resolved [nicmare](https://wordpress.org/support/users/nicmare/)
 * (@nicmare)
 * [5 years, 2 months ago](https://wordpress.org/support/topic/nested-shortcode-support-2/)
 * I am using your plugin with formidable. Any chance to pass the entry value shortcodes
   in my custom shortcode? like:
    [myshortcode firstname=[318] lastname=[319]]

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Thread Starter [nicmare](https://wordpress.org/support/users/nicmare/)
 * (@nicmare)
 * [5 years, 2 months ago](https://wordpress.org/support/topic/nested-shortcode-support-2/#post-14288796)
 * something like formidable does:
    [https://formidableforms.com/knowledgebase/set-values-to-be-used-in-custom-displays-or-default-values/#kb-in-views](https://formidableforms.com/knowledgebase/set-values-to-be-used-in-custom-displays-or-default-values/#kb-in-views)
 *  Plugin Author [E2Pdf](https://wordpress.org/support/users/oleksandrz/)
 * (@oleksandrz)
 * [5 years, 2 months ago](https://wordpress.org/support/topic/nested-shortcode-support-2/#post-14289394)
 * Hi,
 * Currently it’s possible to use only [id] and [key] as nested shortcode attributes
   so to solve the task we can offer you 2 possibilities to solve the task:
 * **1st solution:**
    Create Formidable Forms View with shortcode inside: `[myshortcode
   firstname="[318]" lastname="[319]"]`
 * And use inside E2Pdf Template:
    `[display-frm-data id=123 filter=limited entry_id
   ="[id]"]` * where 123 is the ID of Formidable Form View.
 * **2nd solution:**
    Create custom shortcode wrapper which will generate shortcode
   as you need. Here is the code example which must be added to theme functions.
   php or PHP snippet: [https://codeshare.io/G6NrKY](https://codeshare.io/G6NrKY)
 * After adding code it will be need to use:
    `[myshortcode-wrapper dataset="[id]"]`
 * We remain at your service.
 *  Thread Starter [nicmare](https://wordpress.org/support/users/nicmare/)
 * (@nicmare)
 * [5 years, 1 month ago](https://wordpress.org/support/topic/nested-shortcode-support-2/#post-14291938)
 * great! 2nd solution is what i was looking for. for my needs the final code is
   this:
 *     ```
       function myshortcode_wrapper($atts) {
       	if (isset($atts['dataset']) && !empty($atts['dataset']) && class_exists('FrmEntry')) {
       		if ($entry = FrmEntry::getOne(sanitize_key($atts['dataset']))){
       			$form = FrmForm::getOne($entry->form_id);
       			$shortcode = '[intro_text anrede="[318]" fullname="[311]" anlass="[214]" datum="[165]" location="[171 show=value]"]';
       			return do_shortcode(apply_filters('frm_content', $shortcode, $form, $entry));
       		}
       	}
       	return '';
       }
       add_shortcode('intro_text_e2pdf', 'myshortcode_wrapper');
       ```
   
 * then in the e2pdf template i call it this way:
 * `[intro_text_e2pdf dataset="[id]"]`
 * thank you very much!
    -  This reply was modified 5 years, 1 month ago by [nicmare](https://wordpress.org/support/users/nicmare/).

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Nested Shortcode support?’ is closed to new replies.

 * ![](https://ps.w.org/e2pdf/assets/icon-256x256.gif?rev=3491921)
 * [E2Pdf - Export Pdf Tool for WordPress](https://wordpress.org/plugins/e2pdf/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/e2pdf/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/e2pdf/)
 * [Active Topics](https://wordpress.org/support/plugin/e2pdf/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/e2pdf/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/e2pdf/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [nicmare](https://wordpress.org/support/users/nicmare/)
 * Last activity: [5 years, 1 month ago](https://wordpress.org/support/topic/nested-shortcode-support-2/#post-14291938)
 * Status: resolved