Home › Forums › Front-end Issues › Load fields in front end form › Reply To: Load fields in front end form
Hi @wullaski
This is possible by running the ACF location rule match functionality based on the current screen.
something like this should work:
<?php
// get field groups
$filter = array(
'post_type' => 'post',
'post_id' => 0
);
$field_groups = array();
$options['field_groups'] = apply_filters( 'acf/location/match_field_groups', $field_groups, $filter );
?>
Note: this is based of the api.php -> acf_form function and has not been tested
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.