我想创建一个新的表单字段来输入实体键,在这种情况下是 ArticleId 而不是 Integer 字段,我可以这样做吗?
有我的文章模型
Article
title Text
content Text
userId Int
score Int Maybe
deriving Show
deriving Eq
还有我的 AForm 文章处理程序
<$> areq intField (bfs ("Article Id" :: Text)) Nothing
<*> areq intField (bfs ("Tag Id" :: Text)) Nothing
我想这样做以避免在我的 selectList 中使用 toSqlKey
谢谢!