Instantly share code, notes, and snippets.

Embed
What would you like to do?
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