我有安装BuddyPress的有3个小组。当用户在前台编辑自己的个人资料,我想,如果当他们点击保存,它会自动前进到下一个字段组。BuddyPress的编辑个人资料顺序
因此,举例来说,我编辑我的场1组配置文件,点击保存,就带我到现场组2,所以我可以编辑,而无需点击导航标签领域。
因为这是与方法的形式=“POST”我假定这将是作为检查后值一样简单。问题是当我编辑配置文件,并保存没有发布数据。即时通讯使用这只是用于故障排除(注意,这些空车返回我节省后):
//Next step progression
//Check the field group
echo bp_get_current_profile_group_id();
if(bp_get_current_profile_group_id() == 1) {
echo '<pre>';
print_r($_GET);
echo '</pre>';
echo '<pre>';
print_r($_POST);
echo '</pre>';
if(isset($_POST['_wpnonce'])){ ?>
<script>
jQuery(document).ready(function($){
alert('Saved');
});
</script>
<?php }
} elseif(bp_get_current_profile_group_id() == 2) {
}
挖得更深一些,我看到表单动作是在此之后:<?php bp_the_profile_group_edit_form_action(); ?>
它调用函数<?php bp_get_the_profile_group_edit_form_action(); ?>
我看到我可以添加从how this function is documented过滤器/行动,但我似乎无法得到它的工作。
这无疑让我给我的答案。非常感谢! – Derek