Jump to content

ProFields Table/editable column headers


a-ok
 Share

Recommended Posts

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

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).

  • Like 1
Link to comment
Share on other sites

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

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

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.

  • Like 1
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...