HTML Snippet Subform population help

HTML Snippet Subform population help

I have a subform in my form that allows me to select multiple comments from a comment library. When I try to call the comments in an HTML Snippet, it only populates the first comment. How do I get the it to populate all comments for that specific record?

What I have
  1. <%{%>
  2. <p>
  3. Foundation Comments&#58;&nbsp; 
  4. <ul>
  5. <%
  6. source = Inspection_Report[ID != 0];
  7. get_detail = Comments[ID == input.source.Foundation_Comments.Foundation_Comments];
  8. for each response in Comments[ID == input.source.Foundation_Comments.Foundation_Comments]
  9. {
  10. Foundation_Comments_value = get_detail.Comment.getall();
  11. %>
  12. <li>
  13. <%=Foundation_Comments_value%>
  14. </li>
  15. <%
  16. %>

  17. </ul>
  18. <br>
  19. </p>
  20. <%
  21. }%>

I'm new at this and learning through Google/Youtube, so explain it to me in easy terms please.