Radio buttons with differeing labels and values

Hi, newbie question, I did a search and could not find an answer, so here goes my first post :slight_smile:

I would like to have labels for my radio buttons that are different from the values. Can this be done in FM Better Forms? I know how to do this with standard HTML forms. The Vue-JS help talks about “v-model”. But I am new to Vue-js too, so not sure how to do this in FM BetterForms.

1 Like

This is actually a BF thing vs a Vue thing.

in short you need to add an object with two keys, one with the ialue and the other with the label (name):

  "values" :[{
    "name" : "Red",
    "value" : "FF0000"
  },{
    "name" : "Green",
    "value" : "00FF00"
  }]

Reference:

Great, thanks. That is working now :grinning_face_with_smiling_eyes:

Thanks Charles, I also needed this info today!!

I think this would make a great addition to the “Snippet Library” in the editor. Without it being there, it takes a bit of digging to find.

This has been added to the snippets as radio button - objects

2 Likes