Populate Radio Button Choices Value from Xano

I was trying to figure out how to populate radio buttons from a Xano database. I was thinking it should be an Object or JSON? Not really sure how to format. I did find this [{label: 'option 1', value: 'opt1'},{label: 'option 2', value: 'opt2'}] in a separate posting so I assume once I figure out how to store and read in, I can use that formatting.

I recognize that :slight_smile:
I would recommend that you use the bind option
image
This will give you a stacked list like
image
If you want a side to side listing, then currently, you can bind your options and values to a ‘Columns’ object and you may need to make/use a variable

What exactly are you trying to accomplish?

Ah yes, I noticed that.

Here’s my goal: I have a table with Questions in one field, options in another, so I can have a question then the user can answer Yes/No or True/False or other type options as their answer to the question.

I figured I could read in JSON but there’s very little documentation around the Choices values formatting. I noticed the question you started, and thats how I started the JSON in Xano
2022-10-24_14-28-21

I’m no coder so I’m just tinkering with this, so it may not be in the right format, but thats what I started, but when I read it into WeWeb its empty…

I don’t think I understand the whole “columns object” thing, can you elaborate?

If you are just started out then you may want to check out WeWeb Academy.
I would recommend simply binding the values using the native ‘plug/binding’ option.
You won’t need to worry about JSON formatted data then as WeWeb handles this the same way that you would handle Single Select, Multi Select, Checkboxes and more.

You may want put some work/thought in the the database tables and the queries as this can be done a few different ways.

This video Display backend data in the frontend - YouTube does go over using columns (but as rows) for repeating elements.

Thanks, I have been through the WeWeb academy, but didnt see any mention on how this particular field reads in both the label and the value. I misunderstood that you actually meant columns. I do understand how those work, just not how they would help me bind Xano fields to radio buttons.

Honestly since I’m just tinkering I’ll get to the whole database structure thing and figure that out later. I really am trying to just find out how to bind a radio button to a xano field, so if you have any ideas or a step by step guide how to do that I’m all ears!

Here is how you can bind data from Xano to a Radio set

The value will be the same as the displayed text.

Ah interesting, a rollup, that makes sense! I was told there had to be a key pair somewhere and was going about it the impossible way. Appreciate the help!

I do see why you said put some thought in the database, because now this opens a whole new set of questions I’ll have to think about. Let me see if I can make this first part work then I’ll tackle that next :slight_smile: