Hi @filipnarcis
Thank you for response!
This makes sense and I understand why you want to use it that way. However, I did some more testing and I’m afraid I don’t see a workaround here.
There are two main issues:
1. JS not working in the first place
As mentioned previously, it’s not really a matter of shortcode being processed correctly or not. If the table is showing up, shortcode is working. The problem is that the JS is not correctly handling the DOM and upon further checkup it turns out it’s directly related to the DataTables library. It’s actually a 3rd-party library used by Tablepress plugin (not even from Tablepress developers).
There seems to be no any obvious conflicts or errors with Forminator and there doesn’t seem to be anything on Forminator end that should/could be fixed. It requires some changes in either how DataTables library is initialized (by the TablePress plugin) or how it handles tables.
2. Conditional visibility
You mentioned that tables should be showing up when adding select fields. This is yet another issue because even if these tables start to work in current configuration, then making more HTML fields to show up on site conditionally means a lot of additional JS and dynamically handled (by JS) fields on front. This would cause further conflicts.
To sum it up, making it all work together would require a lot of complex custom development which is out of the scope of this forum (note that using anything JS-driven inside Forminator forms is a custom feature and not bug fixing as Forminator is not designed to handle this kind of input).
A workaround could be to use “static” tables. A 36 or so rows table isn’t super-long in my opinion so if you disable DataTables functions in table settings (when you edit table you can do so at the bottom of table settings) a full table should be showing up and while there’d be no paging and sorting, it would be displayed and those tables should work fine with conditionally visible HTML fields.
Kind regards,
Adam