How can I hide a block of questions based on a URL parameter from the table of contents | XM Community
Skip to main content
Solved

How can I hide a block of questions based on a URL parameter from the table of contents


Forum|alt.badge.img+2

helllo,

I'm distributing a survey with unique URLs for each respondent. The URLs include parameters like `r1=1`, `r4=1`, etc., where each `r` represents a specific information requirement. These requirements may include multiple questions grouped within a block.

 

  • My goal: I want to hide the block of questions corresponding to a specific requirement if the corresponding parameter is present in the URL (e.g., hide the block for `r1` if `r1=1` is present).
  • My question: How can I achieve this? Is there a way to use JavaScript or other methods within Qualtrics to dynamically hide blocks based on URL parameters.

 

I would appreciate any guidance or suggestions from the community on how to achieve this.

 

Thank you!

Best answer by Chee Heng_SZ

Hi @moferro ,

 

I believe that the table of content will not show the other parameter blocks as the unique links provide parameter values that prevents the block from being displayed due to the condition set up for parameters.

For illustration.
moferro wrote:

@Chee Heng_SZ what if the blocks are also a part of a table of contents?

Please elaborate and provide some screenshots for illustration if I have misunderstood your question.

View original

6 replies

Forum|alt.badge.img+16

Hi @moferro ,

 

You already created the unique link using parameters. 

You can create embedded data of the parameters and set the condition for the block to appear using branch logic.

For illustration

Note: Branch logic would prevent back button for that page if you enabled back button.


Forum|alt.badge.img+2
  • Author
  • Level 2 ●●
  • 8 replies
  • August 14, 2024

@Chee Heng_SZ what if the blocks are also a part of a table of contents?


Forum|alt.badge.img+16

Hi @moferro ,

 

I believe that the table of content will not show the other parameter blocks as the unique links provide parameter values that prevents the block from being displayed due to the condition set up for parameters.

For illustration.
moferro wrote:

@Chee Heng_SZ what if the blocks are also a part of a table of contents?

Please elaborate and provide some screenshots for illustration if I have misunderstood your question.


Forum|alt.badge.img+22
  • Level 7 ●●●●●●●
  • 2028 replies
  • August 15, 2024

Hiding a specific block within a TOC is not possible. You can either use JS to hide it at the front end or create multiple TOCs and use branch logic to route the respondent to the relevant one.


Varun Raj Akula
QPN Level 3 ●●●
Forum|alt.badge.img+8
  • QPN Level 3 ●●●
  • 62 replies
  • August 15, 2024

Yes, Using Survey flow Branch logics would be the best option here.


Forum|alt.badge.img+2
  • Author
  • Level 2 ●●
  • 8 replies
  • August 16, 2024

@Chee Heng_SZ thank you so much. That worked perfectly.


Leave a Reply