ACF前端表单以更新术语 [英] ACF front end form to update term
本文介绍了ACF前端表单以更新术语的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想使用ACF前端表单功能创建带有自定义字段的表单
I want to use ACF frontend form function to create a form with custom fields
我看到了创建新术语@Alhana
ACF前端表单以创建术语
,但我想生成带有旧数据的表单
I see this issue for create new term, @Alhana ACF front end form to create term but I want to generate the form with old data
推荐答案
Alhana的答案为我做出了一个更改。如果以 post_id
的值形式发送,则术语对象有效:
The answer from Alhana worked for me with one change. The term object works if sent as the the value for the post_id
:
$term_obj = get_term($term_id);
$acf_form_args = array(
'post_id' => $term_obj,
'post_title' => false,
'submit_value' => 'Update Term',
'field_groups' => array($group_ID),
);
这篇关于ACF前端表单以更新术语的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文