0

I have a Webform where it's used to get product comments. This webform is exposed in a node page and has a field that is populated automatically with a value from the current node, lets say "Manufacturer" and this is just a plain text field. So there are multiple products with the same manufacturer. For example Intel i5 2500k and Intel Motherboard Model-No-1.

I'm using the Webform 7.x-4.x for this. What I have done is use the Webform Submission Data field in Views to display the different data but now what I'm trying to do is when I go to a product, I want the view to filter all the Webform submission by the current product's manufacturer. So when I go visit the i5 2500k page, the view will list also the Webform submissions for the Intel motherboard.

0

So I have found the awesome way to achieve this and it's using Views Contextual Filter, Content pane arguments and Panel pane arguments(automatically added when you add an argument in Views contant pane).

  1. In the View, add a Relationship w/c is Webform Submission Data where it's set to the Webform and field you want to get from the contextual filter.
  2. Add a Contextual filter for the relationship you have created.
  3. Select provide default value and choose Raw value from URL and just choose 1.
  4. Go to the view content pane argument and click edit. You should see a field to reference the contextual filter you have created and add a label you want.
  5. Go to the panel pane's setting you want to get the data from.
  6. Go to it's settings and you will be presented with a field where you can place the tokens provided by you panel page.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.