I’m experiencing the same issue.
I don’t understand why acf_form wouldn’t accept a normal $_POST. How could it be getting all other values without $_POST?
<?php
$first_name = $_POST['acf']['field_5ae11c28116dc'];
// Displays the User Profile fields.
$options = array(
'field_groups' => array(105),
'submit_value' => 'Contact',
'updated_message' => __("Thank you. Your submission has been received.", 'acf'),
'return' => add_query_arg( 'updated', 'true', '' ),
'post_id' => 'new_post',
'new_post' => array(
'post_type' => 'sfm_contact_requests',
'post_status' => 'publish',
'post_title' => $first_name,
),
);
acf_form($options);
I discovered that if you add an ACF Field that matches the existing WordPress User Profile Fields ID / Name then it will auto populate on the front end with the proper value.
#ILoveACF
@moderator I do think this should be state in the documentation for ACF form. I only discovered this by accident.
That all makes sense to me and sounds fair and reasonable! 🙂 Thanks!
Thanks John.
I’m a programmer so let me ask it this way; do you think my staff and I could team up and develop an extension to achieve this or is there a technical boundary that makes this virtually impossible (or just such a high volume of time it’s stupid).
Thanks!
Hey – in what context?
We forked WP Project Manager (http://www.wordpress.org/plugins/project-manager-by-tpc/) and run ACF beside it and it works great.
Early this week we had an epiphany to rebuilt WP Project Manager with ACF as the engine that powers all of the fields and such though so I’m curious to know your experience and thoughts.
Thanks!
Hey everyone, sorry I didn’t get a notification about these replies! Send an email to Spencer Hill (you know the symbol) The Portland Company .com and I’ll get one over to you!
Hey Cody, I was just looking for the same thing and I found this Plugin:
http://codecanyon.net/item/rcwd-upload-for-advanced-custom-fields/5078456
It’s not free though.
Same here.
Here’s what I ended up doing, feedback is welcome though:
echo "<ul>";
$args = array(
'orderby' => 'asc',
'post_type' => 'recap',
);
$recaps = get_posts( $args );
$user_ID = get_current_user_id();
foreach ( $recaps as $recap ) : setup_postdata( $recap );
// Get the User selected as Customer.
$field_key = "field_546162f4a416d";
$post_id = $recap->ID;
$field = get_field_object($field_key, $post_id);
$values = $field['value'];
if ( in_array( 898, $values ) ) {
echo '<li><h3><a href="' . get_permalink($recap->ID) . '">' . $recap->post_title . '</a></h3></li>';
} else {
echo "<h4>You do not currently have any Recaps.</h4>";
}
endforeach;
Hey @sleneau,
My staff and I have developed a Plugin that does this exactly. We’ve not publicly released it yet but in December we plan to. However, we could use some beta testers so if you’d like a copy I’d be happy to send you one if you are interested. Just send an email to support at our domain (theportlandcompany.com).
I’m sorry! I pasted the wrong code. I’ve just updated it with the correct code.
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 Cookie Policy. If you continue to use this site, you consent to our use of cookies.