I have a view set up with various parameters to filter it. When I "view" the view from the link in the plugin dashboard and add the parameters as query vars it's working as expected. URL like so ***/frm_display/tw-submissions-2/?artist_user_id=6923&show_private=No
However, viewing the form using query vars isn't ideal for how I want it in my site. When I try and put the same view on a page and pass the parameters in as code it's not working. Here is what I've tried so far.
echo FrmViewsDisplaysController::get_shortcode( array( 'id' => '52610', 'artist_user_id' => '6923', 'show_private' => 'No') );
//doesn't work
echo do_shortcode('[frm-set-get artist_user_id=7312 show_private="No"]'); echo do_shortcode('[display-frm-data id='52610' ]'); //doesn't work
//doesn't work
echo do_shortcode('[frm-set-get artist_user_id=7312 show_private="No"]'); FrmViewsDisplaysController::get_shortcode( array( 'id' => '52610') );
// doesn't work
Can anyone help? Or point me in the direction of a working example?
Your first example should be close to working. You left off the filter parameter, but I'm not sure that matters. When displaying a view with the PHP alternative, all optional parameters that can be used with the [display-frm-data] shortcode may be used in the PHP call as well. Because you're not receiving a result, did you configure the view filter correctly with the [get param] shortcode. Does your view's filter have [get param="artist_user_id"] and [get_param="show_private"] applied to the correct fields in the form?
BTW, why are you using the PHP alternative? I'm curious.
Please login or Register to submit your answer