Support

Account

Home Forums ACF PRO Flexible Content, Help Creating Dynamic Script to Detect Adjacent Flex Content Reply To: Flexible Content, Help Creating Dynamic Script to Detect Adjacent Flex Content

  • John, thanks for your help! You saved my day for sure.

    I think I would have needed to create a loop to make my other method work?
    It seems arrary_search stops after it finds the first result. So I would have had to loop through the array until it stopped returning matches? I enjoy working with PHP quite a bit, but I am still learning some of the more advanced techniques.

    I had no idea about the adjacent sibling combinator in CSS. That is exactly what I needed and I used this to solve my problem.

    On another note, do you have any ideas on how to speed up the ‘Edit Field Group’ page? When I start adding lots of flexible content blocks and fields in this area it gets pretty slow. I am already using acf-json.

    Thanks again!