Attach_field_load() Drupal 7
我在 drupal 7 的创建用户管理中创建了一些字段。我希望在 drupal 7 中的自定义模块中的自定义表单中包含这些字段。
我不确定,但这个函数 Attach_field_load() 可以解决问题。如果有人可以帮忙的话。
问候
I have created some fields in drupal 7 in create user administration. I want those fields in my custom form in my custom module in drupal 7.
I am not sure but this function attach_field_load() will do the trick. If someone can help.
Regards
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
据我所知,没有
attach_field_load()
函数,您可能正在寻找field_attach_form()
:There is no
attach_field_load()
function to the best of my knowledge, you're probably looking forfield_attach_form()
:从 Drupal 7.22 开始,您只需使用以下代码即可将单个字段添加到表单中。
field_attach_form('my_entity_type', $entity, $form, $form_state, NULL, array('field_name' => 'field_myfield'));
请参阅 https://drupal.org/node/1825844
As of Drupal 7.22 you can simply use the following code to add a single field to your form.
field_attach_form('my_entity_type', $entity, $form, $form_state, NULL, array('field_name' => 'field_myfield'));
See https://drupal.org/node/1825844