I think that the main reason is that the developer doesn’t have time. Eliot does all of the work of development and maintaining the documentation himself.
I’ll mark this post for the developer to look at, but I can’t say when he’ll get to it. Maybe he’ll drop by and say something.
This can be done with conditional logic. You set the conditions in each of the fields you want to appear based on what the client selects for model.
you can use the acf/load_field filter to accomplish this. http://www.advancedcustomfields.com/resources/acf_load_field/
Instead of field['choice']
like the example shows you can alter field['instructions']
The best advice that I can give is to hide them with CSS. I don’t know the details of the css you’d need to use but you can add css to the admin like this.
add_action('admin_init', 'hide_fields_on_attachments');
function hide_fields_on_attachments() {
?>
<style type="text/css>
/* add styles to override wp and hide fields */
</style>
<?php
}
You can use a code inspector to figure out what style you need to add.
I have found that this add on works good for situations like this https://wordpress.org/plugins/acf-enhanced-message-field/
There only things that I can think of that would cause this are
1) you have another field on the same form with the same field name
2) you have filter somewhere on the site that is interfering
3) you’re using a field that’s not somehow not attached to the post type
What do the code and arguments for acf_form() look like? Can you post that?
What’s the name of the repeater field? is it unique?
Honestly, it’s a PITA if you can’t get access to a DB using phpMyAdmin. I’ve gotten to the point that I won’t take on clients if they can’t get me that access.
Sometimes it just takes another set of eyes on it. 🙂
Have you looked at this https://wordpress.org/plugins/adminer/
If you have a custom field name ‘related_lessons’ and it is a relationship field that selects posts in a custom post type then what you’re doing should be working.
Does this output the permalink and the title of the lesson post?
<a href="<?php the_permalink(); ?>"><?php the_title(); ?></a>
What kind of field is ‘author’ on the lesson post type?
I will mark this for the developer’s attention, but my guess is that he’s to busy doing development to keep up with a public to do list. Similar to the reason that he doesn’t read every topic on the forum.
If you’re creating pages and field groups using code I would suggest that when you create the page in question that you store the post_id of the new page in an option value. Then alter the field group php to use that value for the location rule.
'location' => array (
array (
array (
'param' => 'page',
'operator' => '==',
'value' => get_option('my_option_name'),
),
),
),
Change the_sub_field
to get_sub_field
.
When you allow multiple values the values saved is no longer a single text value. Instead it is stored in the DB as a serialized array. You need to alter the meta query, you can see an example of the meta query and it would work the same as the meta query here http://www.advancedcustomfields.com/resources/querying-relationship-fields/#single-location.php. See that page for an explanation of this code.
meta_query = array(
array(
'key' => 'type',
'value' => '"'.$type.'"',
'compare' => 'LIKE'
)
)
You can use several method, if your host allows fopen with a url string http://php.net/manual/en/features.remote-files.php
if not then you will need to use CURL.
Unless the place you’re sending it to requires something special.
This really depends on where it’s going and there is a lot of information out there most of the possibilities.
Yes, changing the names there will cause the data to fail being saved in the new post.
You will need to use either an acf/save_post (http://www.advancedcustomfields.com/resources/acfsave_post/) filter of an acf/pre_save_post (http://www.advancedcustomfields.com/resources/acfsave_post/) filter.
In the filter you can then get the values from the submitted fields and put them into an array with the names that you need to send to the 3rd party before sending the data.
The HTML output looks correct, the JS code is loading and I don’t see anything wrong with it, although I’m not really familiar with that plugin. The next question is, are you seeing any JavaScript errors for the page?
Conditional logic for taxonomy and other fields has been discussed here before and the developer has said in the past that he’s working on it. I’ll mark this topic for him to take a look at. He has a lot on his plate.
In the mean time, my suggestion, if you really need to have conditional logic based on a taxonomy would be to use a select field that has dynamically generated choices. http://www.advancedcustomfields.com/resources/dynamically-populate-a-select-fields-choices/
Is the accordion script being loaded? does it appear in the html output, it should be somewhere near the bottom before the closing </body> tag.
https://wordpress.org/plugins/accordion-shortcodes/faq/
I’ll mark this for the developer to look at when he has time.
Glad you got it worked out.
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.