Vertical List

Vertical List

I am trying to find a way to create a list report that is vertical and not horizontal, as most users access my app on a mobile phone and not a pc so they find scrolling vertically more intuitive. Is there a way to do this? I thought about adding a html snippet to do this, so ChatGPT did some code for me, shown below:

  1. <%
  2.     // Fetch records where the Email field matches the logged-in user's email
  3.     MyAvailability = Current_Availability[Email == zoho.loginuseremail]; // Filtering by email

  4.     // Check if records exist
  5.     if (MyAvailability.isEmpty()) 
  6.     {
  7.         return "No availability records found for the logged-in user.";
  8.     }

  9.     // Start constructing the HTML output
  10.     htmlOutput = "";

  11.     // Loop through each record in MyAvailability
  12.     for each availability in MyAvailability
  13.     {
  14.         // Set the font color conditionally for the Monday11 field
  15.         Monday11Color = "";
  16.         if (availability.Monday11 == "Yes") 
  17.         {
  18.             Monday11Color = "green";
  19.         } 
  20.         else if (availability.Monday11 == "No") 
  21.         {
  22.             Monday11Color = "red";
  23.         }

  24.         // Add the dynamically generated HTML for each availability record
  25.         htmlOutput = htmlOutput + "<div>";
  26.         htmlOutput = htmlOutput + "<h3>Date: " + availability.Mon_Date_1 + "</h3>";
  27.         htmlOutput = htmlOutput + "<p><strong>Monday 11 AM: </strong><span style='color:" + Monday11Color + ";'>" + availability.Monday11 + "</span></p>";
  28.         htmlOutput = htmlOutput + "<hr>";
  29.         htmlOutput = htmlOutput + "</div>";
  30.     }

  31.     return htmlOutput; // Return the generated HTML to display
  32. %>

but I keep getting an error message at line 2, saying Error: Improper statement. error might be due to missing ';' at the end of the line or incomplete expression.

Is this the right way to do this, or is there another way to do it?