Solved
Subsetting Embedded Data
Hi all,
Is it possible to subset embedded data, generally? And is it possible to do so for custom HTML code? In particular, I'm displaying photos with text beneath them as response options (each response looks like "<img src="..."/><p>...</p>"), participants select one of the responses, the selected response is saved as embedded data, and the the embedded data/selected response is later re-displayed for ratings (e.g., "How extraverted is this person?"). When I re-display the selected responses, I don't want to show the text originally displayed beneath them (i.e., <p>...</p>). Is it possible to subset the embedded data so as to display only the image portion of each response (i.e., <img src="..."/>)? Thanks
Best answer by TomG
@stephanoplis,
You don't even need embedded variables. In your original choices (i.e., options), put the text inside a `<div>` with a class. For this example, let's call the class name 'choiceText'. So, the html for the choices look something like:
```
<img src="image1_url" alt="image1_description"><div class="choiceText">Text description1</div>
<img src="image2_url" "alt_image2_description"><div class="choiceText">Text description2</div>
etc.
```
Then in the follow-up question pipe the answer from the first question, and add JS to hide the text:
```
jQuery("#"+this.questionId+" div.choiceText").hide();
```
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.
