a-ok Posted March 12, 2018 Share Posted March 12, 2018 I'm looking at using ProFields Table for a specific layout. An attached image as an example. The client should be able to add as many tables as they want, and as many table rows with the option to change the thead titles. My thought was to put a table in a repeater field and then use ProFields Table. This is generally okay but the only issue is that the table headers (theads) aren't fixed and need to be changed also. Any thoughts on changing the text for these? Thanks! Link to comment Share on other sites More sharing options...
elabx Posted March 12, 2018 Share Posted March 12, 2018 Don't think this is possible because Table field uses it's own schema and adds a database column per table column, so changing it in the field would change it to all fields it is instantiated. The quickest idea I have to hack around this is to use RuntimeMarkup field and render your custom inputfield using jQuery datatables or something simliar and save it's data in a hidden text field). 1 Link to comment Share on other sites More sharing options...
a-ok Posted March 12, 2018 Author Share Posted March 12, 2018 3 minutes ago, elabx said: Don't think this is possible because Table field uses it's own schema and adds a database column per table column, so changing it in the field would change it to all fields it is instantiated. The quickest idea I have to hack around this is to use RuntimeMarkup field and render your custom inputfield using jQuery datatables or something simliar and save it's data in a hidden text field). Hmm it's okay actually because I can just use the first row as the thead and then the rest can follow and I can style the first row accordingly. However upon adding the table to a repeater, when I try to add a row... it doesn't work. It's hashed in the URL when clicking so I'm guessing some JS isn't firing/is missing because it's in a repeater? Link to comment Share on other sites More sharing options...
elabx Posted March 12, 2018 Share Posted March 12, 2018 20 minutes ago, oma said: Hmm it's okay actually because I can just use the first row as the thead and then the rest can follow and I can style the first row accordingly. Doing this myself right now in a project, and very weird what's happening to you because I'm also using the table field inside a RepeatrMatrix and I'm not having any issues with adding rows. Link to comment Share on other sites More sharing options...
a-ok Posted March 12, 2018 Author Share Posted March 12, 2018 6 minutes ago, elabx said: Doing this myself right now in a project, and very weird what's happening to you because I'm also using the table field inside a RepeatrMatrix and I'm not having any issues with adding rows. It may have to do with having AJAX set on the repeater. 1 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now