Support

Account

Home Forums Backend Issues (wp-admin) Using Repeaters and Flexible Content in new Field Types Reply To: Using Repeaters and Flexible Content in new Field Types

  • Hi John, I must have missed the email alert when you replied to this, so apologies for my delayed response.

    In the end I didn’t use a new field type for the Page Builder side of the project, I used a combination of Flex and Repeaters utilising cloned Field Groups, which coupled with some custom js has worked well. I think your right and it is possible but for the scope of the project it would be too time consuming to work out, and as I’ve managed to achieve it with the built in ACF functionality, ultimately not worth it at the moment…

    Like you however I’m keen to try it properly at some point, so I’ll let you know how I get on.

    I have, however created a new field type to handle options/styles, however it is has turned into a bit of an unwieldy beast. I’m essentially providing settings for margin, padding, background image/colours/gradients and typography. Different sections are enabled in the Field Settings so it can be used for Rows, Columns or the actual content blocks. I feel it does need to be it’s own field type as I’m using quite a bit of custom js and css to control the UI.

    The problem is it takes an age to load especially when there are lots of Field Groups that use it. I’ve narrowed the load time issue to the actual render_field( $field ) function, which contains quite a bit code. So now I’m wondering if it’s possible to use AJAX to trigger the rendering of the field when a button is clicked rather than have each render on page load.