Home Forums Backend Issues (wp-admin) JS performance issues Reply To: JS performance issues

  • After spending many days trying to fix this issue I gave up. I think the problem is a fundamental flaw in the way the ACF repeater code is written, and to fix would involve the ACF authors rewriting the plugin. ACF is an excellent plugin but they should warn customers that the repeater and flexible content fields have their limitations. at least then developers, such as myself, wouldn’t have the embarrassment of trying to fix this issue when a site is in production and being edited daily.

    For my own situation I was able to come up with a workaround. My repeater rows had:

    ***Client name (text)***Client rating (1-5 number selection)***Comment about client (textarea)***Comments about improvements (textarea)***

    I removed all the repeaters and replaced them with a single textarea. The editors input each row as a new line in the textarea. Each field in the content is separated with a “#”, like this:

    Walmart#3#Walmart communicated effectively to get the job done.#Walmart has issues with management that could be addressed.

    KFC#4#KFC were excellent clients, understanding and trustworthy#KFC could improve their internal workforce structure.

    The textarea is called “clientreport”. To call the data I use:

    $str = get_field(“clientreport”); /////this gets the field////
    $arr = explode(“\n”,$str); /////this explodes the content by line break/////
    foreach ($arr as $arrs){
    $arr2[] = explode(“#”,$arrs);} //////this explodes each row by “#”////
    echo $arr2[0][0]; ////will echo out “Walmart”////
    echo $arr2[1][0]; ///will echo out “KFC”/////

    This gives me a similar array as with the repeaters and I can foreach through the array. Above the “clientreport” textarea I put a format example for the client.

    This workaround worked for me and may help some poor soul.

    If you have a lot of repeaters I would advise understanding the plugins limitations and trying to come up with your own workaround.

    Can ACF please communicate the plugins limitations when it comes to using lots of repeaters/flexibles.