Home › Forums › Front-end Issues › How to show ACF Repeater in front end form › Reply To: How to show ACF Repeater in front end form
Hi @madhan2085
I believe you don’t need to use this code if you don’t use AJAX to load the form:
<script type="text/javascript">
(function($) {
// setup fields
acf.do_action('append', $('#popup-id'));
})(jQuery);
</script>
Regarding your issue, it seems there’s something wrong with this code:
‘field_groups’ => array('field_57aad46f04ccc'),
A field group’s key is formatted like this: group_1234567890abc
. If you want to restrict the fields, please use the following code instead:
‘fields’ => array('field_57aad46f04ccc'),
If you want to do it for a field group, you can use the field group ID like this:
‘field_groups’ => array(99),
You can get the ID in the field group editor page’s URL. For example in this link:
http://example.com/wp-admin/post.php?post=99&action=edit
’99’ is the field group ID.
I hope this makes sense 🙂
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.