{"id":3108,"date":"2023-05-15T20:16:31","date_gmt":"2023-05-15T20:16:31","guid":{"rendered":"https:\/\/obo.zoj.mybluehost.me\/uncategorized\/dynamic-content-substitution\/"},"modified":"2025-09-15T13:04:53","modified_gmt":"2025-09-15T13:04:53","slug":"dynamic-content-substitution-show-hide-for-responsive-design","status":"publish","type":"post","link":"https:\/\/ioninteractive.com\/ionacademy\/dynamic-content-substitution-show-hide-for-responsive-design\/","title":{"rendered":"Dynamic Content Substitution"},"content":{"rendered":"\n<p class=\"\">You can display different content to different visitors based on the presence of certain query string values or data collected elsewhere in the experience. For example, you could set your email address form field to hide if you\u2019ve previously collected that visitor\u2019s email address. You could also show and hide different headlines and images based on query string information to tailor the experience based on where the visitor is coming from. You could even set a value on the submission of the form so that when that visitor returns, they are shown a different form to put together a progressive profile of the respondent. Check the video below:<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>How to use Show &amp; Hide for Responsive Design<\/strong><\/h3>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>&nbsp;<\/strong><\/h3>\n\n\n\n<p class=\"\">In the example below, there is a quiz with four possible results (Result A, B, C and D). According to the score obtained by the user, previously defined in the rules, the following condition was defined using the Show &amp; Hide functionality:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" width=\"1024\" height=\"496\" loading=\"lazy\" src=\"https:\/\/ioninteractive.com\/ionacademy\/wp-content\/uploads\/2023\/05\/image-2-1024x496.png\" alt=\"\" class=\"wp-image-7726\" srcset=\"https:\/\/ioninteractive.com\/ionacademy\/wp-content\/uploads\/2023\/05\/image-2-1024x496.png 1024w, https:\/\/ioninteractive.com\/ionacademy\/wp-content\/uploads\/2023\/05\/image-2-300x145.png 300w, https:\/\/ioninteractive.com\/ionacademy\/wp-content\/uploads\/2023\/05\/image-2-768x372.png 768w, https:\/\/ioninteractive.com\/ionacademy\/wp-content\/uploads\/2023\/05\/image-2.png 1261w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p class=\"\">This way, if the <em>ScoreLetter<\/em> value of the rules is equal to A, the content present in the container named \u201cResult A\u201d will appear. If it is equal to B, the other container will be displayed, and so on:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" width=\"1024\" height=\"491\" loading=\"lazy\" src=\"https:\/\/ioninteractive.com\/ionacademy\/wp-content\/uploads\/2023\/05\/image-3-1024x491.png\" alt=\"\" class=\"wp-image-7728\" srcset=\"https:\/\/ioninteractive.com\/ionacademy\/wp-content\/uploads\/2023\/05\/image-3-1024x491.png 1024w, https:\/\/ioninteractive.com\/ionacademy\/wp-content\/uploads\/2023\/05\/image-3-300x144.png 300w, https:\/\/ioninteractive.com\/ionacademy\/wp-content\/uploads\/2023\/05\/image-3-768x368.png 768w, https:\/\/ioninteractive.com\/ionacademy\/wp-content\/uploads\/2023\/05\/image-3.png 1238w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p class=\"\">Note that, in this case, the rules that save the ScoreLetter data had already been defined through page rules:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" width=\"1024\" height=\"522\" loading=\"lazy\" src=\"https:\/\/ioninteractive.com\/ionacademy\/wp-content\/uploads\/2023\/05\/image-4-1024x522.png\" alt=\"\" class=\"wp-image-7730\" srcset=\"https:\/\/ioninteractive.com\/ionacademy\/wp-content\/uploads\/2023\/05\/image-4-1024x522.png 1024w, https:\/\/ioninteractive.com\/ionacademy\/wp-content\/uploads\/2023\/05\/image-4-300x153.png 300w, https:\/\/ioninteractive.com\/ionacademy\/wp-content\/uploads\/2023\/05\/image-4-768x392.png 768w, https:\/\/ioninteractive.com\/ionacademy\/wp-content\/uploads\/2023\/05\/image-4.png 1188w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p class=\"\">The same goes for the rules of a submit button, for example. The important thing is that the data that will trigger the dynamic conditioning (here exemplified with the rule: save data &gt; ScoreLetter = A) is collected before the Show &amp; Hide, which <strong>only works if there is a page refresh<\/strong>.<\/p>\n\n\n\n<p class=\"\">\u00a0You can apply the same logic to hide a form that has already been filled out by the user, and display a thank you message. For this, add a rule on the submit button that will save the data that will trigger the Show &amp; Hide conditions. For example: <strong>save data > formcomplete = true<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" width=\"1024\" height=\"499\" loading=\"lazy\" src=\"https:\/\/ioninteractive.com\/ionacademy\/wp-content\/uploads\/2023\/05\/image-5-1024x499.png\" alt=\"\" class=\"wp-image-7733\" srcset=\"https:\/\/ioninteractive.com\/ionacademy\/wp-content\/uploads\/2023\/05\/image-5-1024x499.png 1024w, https:\/\/ioninteractive.com\/ionacademy\/wp-content\/uploads\/2023\/05\/image-5-300x146.png 300w, https:\/\/ioninteractive.com\/ionacademy\/wp-content\/uploads\/2023\/05\/image-5-768x374.png 768w, https:\/\/ioninteractive.com\/ionacademy\/wp-content\/uploads\/2023\/05\/image-5.png 1201w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p class=\"\">Now, select the thank you message you want to display, and apply the condition:<strong> show conditionally > formcomplete \u2013 equals \u2013 true<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"985\" height=\"508\" loading=\"lazy\" src=\"https:\/\/ioninteractive.com\/ionacademy\/wp-content\/uploads\/2023\/05\/image-6.png\" alt=\"\" class=\"wp-image-7735\" srcset=\"https:\/\/ioninteractive.com\/ionacademy\/wp-content\/uploads\/2023\/05\/image-6.png 985w, https:\/\/ioninteractive.com\/ionacademy\/wp-content\/uploads\/2023\/05\/image-6-300x155.png 300w, https:\/\/ioninteractive.com\/ionacademy\/wp-content\/uploads\/2023\/05\/image-6-768x396.png 768w\" sizes=\"auto, (max-width: 985px) 100vw, 985px\" \/><\/figure>\n\n\n\n<p class=\"\">\u00a0Similarly, you will select the form and set: <strong>hide conditionally > formcomplete \u2013 equals \u2013 true<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"1020\" height=\"577\" loading=\"lazy\" src=\"https:\/\/ioninteractive.com\/ionacademy\/wp-content\/uploads\/2023\/05\/image-7.png\" alt=\"\" class=\"wp-image-7737\" srcset=\"https:\/\/ioninteractive.com\/ionacademy\/wp-content\/uploads\/2023\/05\/image-7.png 1020w, https:\/\/ioninteractive.com\/ionacademy\/wp-content\/uploads\/2023\/05\/image-7-300x170.png 300w, https:\/\/ioninteractive.com\/ionacademy\/wp-content\/uploads\/2023\/05\/image-7-768x434.png 768w\" sizes=\"auto, (max-width: 1020px) 100vw, 1020px\" \/><\/figure>\n\n\n\n<p class=\"\">Done! This way, if the respondent is the same, the thank you message will be displayed whenever he\/she returns to the experience, indicating that the form has already been filled out previously:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"1022\" height=\"530\" loading=\"lazy\" src=\"https:\/\/ioninteractive.com\/ionacademy\/wp-content\/uploads\/2023\/05\/image-8.png\" alt=\"\" class=\"wp-image-7739\" srcset=\"https:\/\/ioninteractive.com\/ionacademy\/wp-content\/uploads\/2023\/05\/image-8.png 1022w, https:\/\/ioninteractive.com\/ionacademy\/wp-content\/uploads\/2023\/05\/image-8-300x156.png 300w, https:\/\/ioninteractive.com\/ionacademy\/wp-content\/uploads\/2023\/05\/image-8-768x398.png 768w\" sizes=\"auto, (max-width: 1022px) 100vw, 1022px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" width=\"1024\" height=\"514\" loading=\"lazy\" src=\"https:\/\/ioninteractive.com\/ionacademy\/wp-content\/uploads\/2023\/05\/image-1024x514.png\" alt=\"\" class=\"wp-image-7707\" srcset=\"https:\/\/ioninteractive.com\/ionacademy\/wp-content\/uploads\/2023\/05\/image-1024x514.png 1024w, https:\/\/ioninteractive.com\/ionacademy\/wp-content\/uploads\/2023\/05\/image-300x151.png 300w, https:\/\/ioninteractive.com\/ionacademy\/wp-content\/uploads\/2023\/05\/image-768x386.png 768w, https:\/\/ioninteractive.com\/ionacademy\/wp-content\/uploads\/2023\/05\/image.png 1087w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Embed<\/strong><\/h3>\n\n\n\n<p class=\"\">Within the same style section of your creative studio, you will find the \u201cHide when embedded\u201d checkbox. This option is great for pages that you would like to embed into your website! This option allows you to publish pages as you normally would for your typical traffic but also use the Ion embed code to embed certain portions of the page on your website:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"276\" height=\"352\" loading=\"lazy\" src=\"https:\/\/ioninteractive.com\/ionacademy\/wp-content\/uploads\/2023\/05\/image-9.png\" alt=\"\" class=\"wp-image-7741\" srcset=\"https:\/\/ioninteractive.com\/ionacademy\/wp-content\/uploads\/2023\/05\/image-9.png 276w, https:\/\/ioninteractive.com\/ionacademy\/wp-content\/uploads\/2023\/05\/image-9-235x300.png 235w\" sizes=\"auto, (max-width: 276px) 100vw, 276px\" \/><\/figure>\n\n\n\n<p class=\"\">For example, after building a page, you may decide that you would really love to embed the form and Thank You page content into your website. You can do this with a single experience by simply selecting the content you don\u2019t want to show on your website, and checking the \u201chide when embedded\u201d checkbox. You will then be able to use the Ion embed code to embed the form and Thank You page content into your website. For more information on ion embed code, click <a href=\"https:\/\/ioninteractive.com\/ionacademy\/embed-code-embed-your-creative-into-a-third-party-site\/\">here<\/a>.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Responsive page<\/strong><\/h3>\n\n\n\n<p class=\"\">When editing a responsive page, you will also have show and hide style options to show\/hide certain elements for certain screen sizes. When deciding to hide a certain element, just select the screen size for which you want to hide its content. Below, find the abbreviation<br>to which device type each size typically corresponds to:<\/p>\n\n\n\n<p class=\"\">XS = portrait mode display<br>SM = landscape mode screen<br>MD = tablet<br>lg = desktop<\/p>\n\n\n\n<p class=\"\">If you want to hide content when viewing a certain page on a mobile device, you can check the \u201cHide in XS\u201d checkbox \u2013 it will not render when the page is viewed on a mobile device:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"688\" height=\"399\" loading=\"lazy\" src=\"https:\/\/ioninteractive.com\/ionacademy\/wp-content\/uploads\/2023\/05\/image-1.png\" alt=\"\" class=\"wp-image-7709\" srcset=\"https:\/\/ioninteractive.com\/ionacademy\/wp-content\/uploads\/2023\/05\/image-1.png 688w, https:\/\/ioninteractive.com\/ionacademy\/wp-content\/uploads\/2023\/05\/image-1-300x174.png 300w\" sizes=\"auto, (max-width: 688px) 100vw, 688px\" \/><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>You can display different content to different visitors based on the presence of certain query string values or data collected elsewhere in the experience. For example, you could set your email address form field [&hellip;]<\/p>\n","protected":false},"author":5,"featured_media":6022,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"nf_dc_page":"","footnotes":""},"categories":[2272,2078],"tags":[2173,2194],"class_list":["post-3108","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-rules-overview-the-advanced-capabilites","category-the-advanced-capabilites","tag-advanced","tag-rules"],"_links":{"self":[{"href":"https:\/\/ioninteractive.com\/ionacademy\/wp-json\/wp\/v2\/posts\/3108","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ioninteractive.com\/ionacademy\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ioninteractive.com\/ionacademy\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ioninteractive.com\/ionacademy\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/ioninteractive.com\/ionacademy\/wp-json\/wp\/v2\/comments?post=3108"}],"version-history":[{"count":6,"href":"https:\/\/ioninteractive.com\/ionacademy\/wp-json\/wp\/v2\/posts\/3108\/revisions"}],"predecessor-version":[{"id":7742,"href":"https:\/\/ioninteractive.com\/ionacademy\/wp-json\/wp\/v2\/posts\/3108\/revisions\/7742"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/ioninteractive.com\/ionacademy\/wp-json\/wp\/v2\/media\/6022"}],"wp:attachment":[{"href":"https:\/\/ioninteractive.com\/ionacademy\/wp-json\/wp\/v2\/media?parent=3108"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ioninteractive.com\/ionacademy\/wp-json\/wp\/v2\/categories?post=3108"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ioninteractive.com\/ionacademy\/wp-json\/wp\/v2\/tags?post=3108"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}