当我更改表单中的字段时,我想将表单提交到服务器。有人知道是否有更改回调或类似的东西?
我的表格:
class SettingsScreen < PM::FormotionScreen
title "Settings"
tab_bar_item title: "Settings", icon: 'settings'
def table_data
{
sections: [
{
title: "Settings",
rows: [
{
title: "Start Date",
key: :start_date,
type: :date,
format: :medium
}, {
title: "End Date",
key: :end_date,
type: :date,
format: :medium
}
]
}
]
}
end
def on_load
self.form.on_submit do |form|
p "submitting!"
end
end
end