I am trying to display a form associated to each row inside a table of CPT output (think archive-.php level view.
$field_values = 'comment_mode=email&comment_receiver=' . $emailAddress;
$output .= do_shortcode('[gravityform id="' . COMMENTFORM_ID . '" title="false" description="false" ajax="true" field_values="' . $field_values . '"]');
That code will work the first time the shortcode is presented on screen, but not all. I am trying to include it as a part of a heavily customized WP_Query loop within a shortcode for a plugin where it could be repeated 20 - 30 times per page - css / js will show/hide the actual form when the user clicks that they would like to comment on the CPT row involved.
Writing this support post out, it seems like it would be more efficient to have one form and somehow pass the variables which change per row to the form when the user clicks the button that is specific to that row to show / hide the form, but not quite sure how to do that.
Any suggestions? or examples where others are using a single form multiple times on the same page that could work when being called in the plugin code for generating a shortcode?