I can't seem to get Views-based blocks to show up on an Entityform page (Drupal 7). The View has a Contextual Filter of "Entityform Submission: Entityform submission ID". For the "When the filter value is not available" setting, I have "Provide default value: Content ID from URL" selected:

enter image description here

When I enter in an Entityform Submission ID in the Preview section, I get the results I'm after. However, when I place the Block on an Entityform page, it doesn't even show up.

What am I doing wrong?

  • I gave my brain some space from this problem and came up with a solution that works for me. See my answer below. – Sam Dec 18 '18 at 13:54

I solved my own problem by changing the "When the filter value is NOT available" setting to "Provide default value: Content ID from URL" and using the 2nd path component (which is the Entityform submission ID):

enter image description here

This works for me. But I can imagine a scenario where the ID is obscured from the URL and this wouldn't work.

  • I could be wrong but is it because block displays can’t read arguments in some cases? I feel like that was a thing in D7. – Kevin Dec 18 '18 at 16:34
  • @Kevin Interesting. Maybe someone can confirm. And yes, I should specify that is Drupal 7. – Sam Dec 18 '18 at 18:53
  • If you do php filter and return arg(2); does it work? – Kevin Dec 18 '18 at 18:55
  • @Kevin I'll try that… but, that's essentially the same thing as my answer which uses the 2nd path component, right? – Sam Dec 18 '18 at 18:57
  • I'm not entirely certain - does raw value from URL actually mean arg(2), or is it just whats in the second part of the URL (like the alias)? – Kevin Dec 18 '18 at 19:54

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.