Skip to content

Instantly share code, notes, and snippets.

@bensie
Created June 18, 2013 23:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bensie/5810500 to your computer and use it in GitHub Desktop.
Save bensie/5810500 to your computer and use it in GitHub Desktop.
Formotion dynamic select_one
@form = Formotion::Form.new({
sections: [
{
select_one: true,
rows: value["choices"].map do |choice|
{
title: choice["description"],
key: choice["description"],
value: value["current"] == choice["description"],
type: :check
}
end
},
{
rows: [{
title: "Save",
type: :submit
}]
}
]
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment