2014-07-10 10:57
浏览 29


I am using Advance Custom Fields to create a new fields within the members profiles. Using the locations panel within the setting, i can target the user group and the fields i want to display (which works perfectly).

However, i am now using the acf_form function that allows me insert the form into a front end. I have created three test accounts, not including my admin account. Within the admin account, i upload an image and fill out one of the custom fields. When i log into the other account, those fields have already got that values i associated from the admin account.

This only happen in the front end form as when i visit the wordpress official user profile, its empty (like it should be).

<?php $options = array(
    'post_id' => $post->ID,
    'field_groups' => array(77),
    'form' => true, 
    'return' => add_query_arg( 'updated', 'true', get_permalink() ),
    'html_before_fields' => '',
    'html_after_fields' => '',
    'submit_value' => 'Update'
acf_form( $options );

Is there any reason why it is doing that?

图片转代码服务由CSDN问答提供 功能建议

我使用高级自定义字段在成员个人资料中创建新字段。 使用设置中的位置面板,我可以定位用户组和我想要显示的字段(效果很好)。

但是,我现在使用 acf_form < / code>允许我将表单插入前端的功能。 我创建了三个测试帐户,不包括我的管理员帐户。 在管理员帐户中,我上传图片并填写其中一个自定义字段。 当我登录到另一个帐户时,这些字段已经从管理员帐户获得了我关联的值。

这只发生在前端表单中,就像我访问wordpress官方用户配置文件时一样 ,它是空的(就像它应该的那样)。

 &lt;?php $ options = array(
'post_id'=&gt; $ post-&gt; ID,
  'field_groups'=&gt; array(77),
'form'=&gt; true,
'return'=&gt; add_query_arg('updated','true',get_permalink()),
'html_before_fields'=  &gt;'',
acf_form($ options); 
  <  / pre> 


  • 写回答
  • 好问题 提建议
  • 追加酬金
  • 关注问题
  • 邀请回答

1条回答 默认 最新

相关推荐 更多相似问题