• Resolved AndreaTKC

    (@andreatkc)


    I have an ACF custom field in my media library that is a simple yes or no dropdown.

    I can create a rule for it so it shows in the “Assistant” view of my media library, but the column is blank. If I edit the field with the quick edit, the value doesn’t change in the actual page, but it does show the value I added in the column. It just doesn’t pull data from the field or hook up so that you can change the value.

    What am I missing? Does it not work with dropdowns?

Viewing 6 replies - 1 through 6 (of 6 total)
  • Thread Starter AndreaTKC

    (@andreatkc)

    I’ve run into another task that I’ve been dealing with manually that I’d love to automate a bit more. Since I already have this question open, I’m going to go ahead and add it here.

    Is there a way to bulk prepend a word on to a group of titles? I have some images that are just JPG versions of Illustrator files that the user can download from that attachment page. I usually manually put “Adobe Illustrator:” in front of the title so users know which files are Illustrator files. I’d like to be able to automate this so I can just add it to the beginning of the title without replacing the whole title.

    Thanks for any ideas on this. ??

    Plugin Author David Lingren

    (@dglingren)

    Good to hear from you again; it’s been a while.

    I ran some tests on my system and I am able to create an ACF “Select” field, add it to the Media/Assistant submenu table and edit the field content in the Quick Edit and Bulk Edit areas. It looks like there may be a mismatch between your ACF field and the rule you created. Here are the steps I followed so you can compare them to yours:

    First, I created an ACF “Select” field with three values:

    yes : Yes
    nope : No
    Maybe
    

    For my test I specified both the option value (e.g., nope) and label (e.g., No). I entered “ACF Select” in the field Label box; this generated a field Name “acf_select”.

    Next, I created my mapping rule:

    1. Navigate to the Settings/Media Library Assistant “Custom Fields” tab.
    2. Scroll down to the “Add New Custom Field Rule” section on the left-hand side of the page.
    3. Click the Name dropdown and select the name of your ACF field, e.g. “acf_select” (not the Label, e.g. “ACF Select”). This may be where your mismatch occurred.
    4. Leave the Data Source dropdown set to “– None (select a value) –”. You don’t want the mapping rule to alter the field content.
    5. Check the “MLA Column” box to display the field as a column in the Media/Assistant submenu table.
    6. Check the “Quick Edit” box to add the field to the Media/Assistant Quick Edit area.
    7. Check the “Bulk Edit” box if you want to add the field to the Media/Assistant Bulk Edit area. I did this.
    8. Select “Keep” for “Existing Text”.
    9. Select “Native” for “Format”.
    10. Select “Text” for “Option”.
    11. Leave the “Delete NULL Values” box unchecked.
    12. Leave the “Status” dropdown set to “Active”
    13. Click “Add Rule” to create the new rule.

    Check your ACF values and MLA Custom Field rule settings against my example. If you don’t find a solution, post your ACF values and MLA rule settings so I can review them.

    You asked “Is there a way to bulk prepend a word on to a group of titles?” You can use a Content Template in the Bulk Edit area to update the Title area. The existing Title is available as a data source you can use in the template. For example, you can enter something like this:

    template:Adobe Illustrator: ([+post_title+])
    

    That will preserve the current Description value and add the (literal) phrase ”Adobe Illustrator: ” to it. Note that the new phrase becomes part of the updated Title, so applying the template two or more times to a given item will duplicate the added phrase.

    I am leaving this topic unresolved until the ACF issue is settled. Please update it if you have problems or further questions regarding the above suggestions. Thanks for your continued interest in the plugin

    Plugin Author David Lingren

    (@dglingren)

    It has been a month since the last post in this topic. I assume you have found a solution that works for your application.

    I am marking this topic resolved, but please update it if you are still having trouble with the ACF fields.

    Thread Starter AndreaTKC

    (@andreatkc)

    I apologize for the delay. I only work with this specific library every so often and I missed your message last time I was working in it. The title template formatting was very helpful — that’s working great. Thanks. ??

    I’m still not able to bulk change my ACF values, though. I can select “Yes” in the bulk edit area and the word “Yes” appears in the column for that field — “Yes” is the label. In previous images where “Yes” is selected in the dropdown in the media item, the VALUE shows in the column instead of the label (a snippet of CSS that gets displayed when “Yes” is selected).

    I just can’t seem to figure out the steps to make it change the actual dropdown in the media item. Is there a step I’m missing? I have screenshots of my settings if you let me know where to send them. ??

    Thanks!

    Plugin Author David Lingren

    (@dglingren)

    Thanks for your update with the additional information. I will compare your settings and results to mine and see if I can make some improvements.

    You are welcome to contact me at my web site and I will give you a way to send your screenshots. Thanks for your help and your patience.

    Plugin Author David Lingren

    (@dglingren)

    Thanks for working with me by email on this issue.

    The latest MLA version, 2.98, includes version 1.07 of the “MLA Advanced Custom Fields Example” plugin that supports ACF Select fields and has a Settings screen with a General tab to add/edit the settings and a Documentation tab to explain everything. It would let you use the simple Yes/No labels in place on the CSS fragment in the field value.

    If you have occasion to use the example plugin I’d be interested in your experience. Thanks for inspiring this useful MLA upgrade.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Bulk edit ACF custom field’ is closed to new replies.