Support

Account

Home Forums Bug Reports Repeater Fields in Widgets don't save

Solving

Repeater Fields in Widgets don't save

  • Hi, I’ve set up a widget using ACF. I’ve created a new widget class, where the method “form” only outputs an empty <p> tag in order for ACF to populate and save.

    I tested putting in a regular text field, and that saved without issue when clicking “Save” on the widget. However, adding a repeater field and trying to save the widget, does not save any of the content in the repeater.

    I don’t see any errors in Chrome console nor in the PHP or Nginx logs, so I assume that there’s just an issue with repeaters and specifically widgets.

  • Same problem here. Also doesn’t save with flexible content.

  • Flexible content? Dang, that’d be a large widget 🙂

  • Here’s something…

    I was building an options page with a repeater field and had the same problem as the widget, no matter what I did it wouldn’t save the repeater field.

    Found this support page where Elliot Condon mentions that the Field Names might be too long and not saving properly in the database.

    So I shortened my name field and dropped a bunch of underscores and it worked! I then went back to my widget and did the same thing made the name field shorter and dropped my OCD underscores and it worked!

    Hope this helps, reply if you get it to work.

    Cheers

  • F*ck, that bug (?) just cost me a whole lotta time… thanks for pointing this out, Jeff, really appreciated! Now it is saving properly, phew!

  • I’m having similar issues where repeater fields are not working in a widget. I creates a repeater called logos, and places it in a footer widget. It only contains 3 small logos and all fields have short names.

    It works on all pages, posts, archives etc….

    But then when you do a search, they are missing from the search results page.

    How would I query widget fields directly like you can do posts with get_post_meta()?

    Thanks.

Viewing 6 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic.