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

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!

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.


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


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.

@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.


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.


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


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


Leave a Reply