Thank you Mediawerk.
I really appreciate your work.
Thank you very much.
Sure,
I installed a plugin called ACF Front End Plugin, which displayed the repeater field in fine way and also Added new row while clicking the Add Row Button and then to save the fields I used the pre_save_post and save_post hooks.
//first in functions.php
add_filter(‘acf/pre_save_post’ , ‘my_pre_save_post’ );
function my_pre_save_post( $post_id ) {
global $post;
$current_id = get_current_user_id();
$post_id = ‘user_’ . $current_id;
do_action(‘acf/save_post’, $post_id);
}
and then in template file to save it
if(isset($_POST)){
// $post_id to save against
$current_id = get_current_user_id();
$postID = ‘user_’ . $current_id;
// update the fields as user meta
do_action(‘acf/save_post’, $postID);
}
Hope it helps for others too.
Thanks,
Hi Mediawerk,
I actually need that at backend.
What I am doing is displaying the acf group fields in front-end form. If there is any place to add the class fields in backend then, it will be very simple for me to style and do some scripting.
Thanks,
Please Close this ticket. I solved it using ACF Front End Plugin and some acf hooks.
Thanks
Thanks John for the reply but it was not the exact solution that I needed.
Any way I solved the problem.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.