Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/elixir/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/jsf-2/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Elixir 是否可以使用Phoenix.HTML选择表单帮助器并从EXTO数据填充?_Elixir_Phoenix Framework - Fatal编程技术网

Elixir 是否可以使用Phoenix.HTML选择表单帮助器并从EXTO数据填充?

Elixir 是否可以使用Phoenix.HTML选择表单帮助器并从EXTO数据填充?,elixir,phoenix-framework,Elixir,Phoenix Framework,所以我知道表单帮助器,比如说text\u input你从模式中传递字段的原子,然后在new表单中它将提供一个输入框,在edit表单中输入框将被填充 但是,您可以使用selectformhelper执行相同的操作吗 我有一个模式Foo,它有一个bar\u id,它是对bar的引用,我想在FooPhoenixHTML表单中显示所有bar字段的选择下拉列表 然后在编辑表单中选择框,以显示先前保存的所选条 但是选项值需要是bar项目列表中的bar\u id(使用bar模式中的另一个字段作为选项文本) 这

所以我知道表单帮助器,比如说
text\u input
你从模式中传递字段的原子,然后在
new
表单中它将提供一个输入框,在
edit
表单中输入框将被填充

但是,您可以使用
select
formhelper执行相同的操作吗

我有一个模式
Foo
,它有一个
bar\u id
,它是对
bar
的引用,我想在
Foo
PhoenixHTML表单中显示所有
bar
字段的选择下拉列表

然后在编辑表单中选择框,以显示先前保存的所选

但是选项值需要是
bar
项目列表中的
bar\u id
(使用
bar
模式中的另一个字段作为选项文本)


这在PhoenixHtml中可能吗?或者我必须做一些定制的事情吗?

这似乎是这个问题的解决方案


在没有自定义内容的情况下,无法使用select这似乎是解决此问题的方法

没有自定义内容,就无法使用select