Can Xano output HTML?

Options
I want to take a list of values from a table and display them in an HTML select.  I was wondering if XANO could do some of the work, i.e. by generating the HTML.

For example if my table 'Items' contained column of unique values called 'itemname', could XANO return, for each row,  a string like this:

itemname1
itemname2
itemname3
...

Thanks.[x-sel.jpg]

Comments

  • Wes Wagner
    Wes Wagner Member
    Options
    I'm curious to hear from someone more experienced, but my understanding is that the front-end would handle the logic you're describing.

    Is there a particular reason you'd like the back-end to handle this? Are you using a no-code front-end with a particular limitation, for example?
  • Mr_English
    Options
     Hi thanks for responding.  Yes, my application is built with node.js and express.js. The select will display data from a Xano table. The select would need to be built either in the browser or on the server and I was interested to see if it was more efficient to get some of it built with Xano.
  • Ray Deck
    Ray Deck Trusted Xano Expert ✭✭✭
    Options
    Xano always wants to return JSON AFAIK. You could have it return a JSON payload that contains your HTML string. But even more, you'd rather have Xano return data, and have the job of turning it into HTML or DOM elements on your front-end be the job of your front-end system. This is the way all modern web frameworks work that I can think of. (I am old enough that I remember doing it the harder way, along the lines of what you are describing, in the 2000s)
  • Mr_English
    Options
      Yeah I was trying to keep as much out of the client as possible. But, as you write, this is probably an approach from the past. 

    Thanks, Tony