Hello! I'm using a clonable gruop to show a large data set on a custom post type admin page and the loading time is dramatically high. I'm trying to prevent the loading of the groups until user click on a button.
To do that I find the filter rwmb_{field_id}_html and I write that piece of code for the called function:
if (isset($_GET['show_products']) and !empty($_GET['show_products'])) {
return $field_html;
} elseif ($this->counter++ == 0) {
return '<a>Mostra i prodotti</a>';
} else {
return null;
}
This solution is working fine, exept for the remove buttons that are seems to be ignored by the filter, so in my page, when the user didn't clicked the button, I have zero group but over two hundreds remove buttons!
How I can fix that problem? I would have something more elegant than hiding remove-clone on css because of the number of that.