Views can be published on a page, post, widget, or even within another View. If you haven't created a View yet, follow the instructions to create a basic View.
Use the shortcode builder
- Go to a WordPress page or post.
- Click on the 'Formidable' button above the content box.
- Select the view that you want to publish, then choose from the options below.
- Click the 'Insert into Post' button.
Insert the shortcode manually
You may insert the following shortcode on a page, post, or text widget to display your View.
[display-frm-data id=x filter=limited]
Replace x with the ID or key of the View you would like to insert. You can find the ID or key by going into your View and clicking the 'View Shortcodes' link in the right sidebar.
Parameters
Required
- id - ID or key of the View.
[display-frm-data id=x filter=limited]
Recommended
- filter - Use filter=limited to send your View content through the WordPress content filters. You may see shortcodes on the page without this parameter.
[display-frm-data id=x filter=limited]
The WordPress content filters add auto paragraphs and process shortcodes. Using filter=limited is recommended unless you have any of the following situations:
- Another plugin or your theme is already filtering your View.
- Your View is published inside of another View.
- Some plugins like PHP processing plugins filter differently. You may need filter=1 in order to cover these cases
Optional
- entry_id - Display a specific entry in your View. This will override all other filters in your View.
[display-frm-data id=x filter=limited entry_id="123" ]
- user_id - Display entries submitted by a specific user. This parameter accepts a user ID number, not a username, and it will override any UserID filters you have added to your View.
[display-frm-data id=x filter=limited user_id=12]
- limit - Limit the number of entries displayed in your View. This will override the Limit set in the Advanced Settings of your View.
[display-frm-data id=x filter=limited limit=10]
- page_size - Set a page size for your View. This will override the Page Size set in the Advanced Settings of your View.
[display-frm-data id=x filter=limited page_size=5]
- order_by - Order the entries in your View by a field ID/key or set a random order by using order_by="rand". This will override the Order set in the Advanced Settings of your View. You must use the order parameter in your View shortcode.
[display-frm-data id=x filter=limited order_by=125 order="ASC"]
- order - Specify the direction of the ordered entries with order="ASC" or order="DESC". This will override the Order set in the Advanced Settings of your View.
[display-frm-data id=x filter=limited order_by="created_at" order="ASC"]
- drafts - By default, draft entries are not included in your views. If you'd like to only show the drafts, add drafts=1 to your shortcode. If you'd like to show drafts and non-drafts, use drafts=both.
[display-frm-data id=x filter=limited drafts=both]
- param_name - Pass a value to your View. You may use this value to show specific entries and avoid creating duplicate Views. Put [get param="param_name"] anywhere in your View to display the value. When you pass a value to your View, like this: [display-frm-data id=x my_param="value"], then you can add a filter to your View that sets a field equal to [get param="my_param"].
[display-frm-data id=x filter=limited my_param="value"]
- wpautop - Use wpautop=0 to prevent paragraph tags from being added to Views that include filter=limited. Use wpautop=1 to add paragraph tags to Views.
[display-frm-data id=x filter=limited wpautop=0]
PHP Alternative
echo FrmProDisplaysController::get_shortcode( array( 'id' => x, 'filter' => 'limited' ) );
Replace x with ID or key of the View you would like to display. All optional parameters may be used in the PHP call as well.