Support

Account

Home Forums Backend Issues (wp-admin) Repeater rows not saving in options field

Solved

Repeater rows not saving in options field

  • Hi,

    I have created a simple options page and am trying to save a few email fields in a repeater field in a very basic options page. It was working fine but now it is not working. The only changes I’ve made are that I changed the name of the field, and went from one repeater on the options page to two repeaters. I’ve looked in the database and the fields are actually saving but they are not being called into the inputs. Then when I save again without inputs the fields in the database go blank.

    So it appears that it’s just the stage that calls the rows that is failing.

    I’d appreciate some help with this.

    Thanks,
    Rich

  • I’ve figured it out. It’s a bug with how ACF stores the “field_***” meta value for the relevant key. It appears you add the underscore to the option_name for the field reference and then apply a character limit after this to both the option_name for the value and for the field reference. E.g.

    options_alternating_recipients_0_alternating_recipient_email_add
    _options_alternating_recipients_0_alternating_recipient_email_ad

    Obviously the _*** option_name needs one more char than the value option name. However, could this char limit lead to edge cases where two option names end up with the same name as only the truncated section of the option_name is different. Would it not be better to enforce a character count on the names themselves in the UI?

    Thanks,
    Rich

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

You must be logged in to reply to this topic.