Posted: July 12, 2018 at 7:44 am
We register teams by their pre-assigned team number. We need that team number (custom field) to be on the registrations table and be sortable. What is the best way to accomplish this.
By custom field, I’m assuming you mean a custom EE registration question?
If so then so do the above you’re going to need to be pretty comfortable with PHP, I have an example snippet to get you started but its not going to work out of the box, you’ll need to customize the code to work for your specific use case.
Take a look here:
At a minimum you’ll need to change line 12:
You can likely remove lines 16-20:
Thats the ID for the question you want to pull the data from.
Line 38: https://gist.github.com/Pebblo/88f2a0a9213c716e4886a249e7709245#file-example-php-L38
To tell EE that the column key should be sortable (again it should match what you set as the key on line 12)
And finally (iirc) line 56: https://gist.github.com/Pebblo/88f2a0a9213c716e4886a249e7709245#file-example-php-L56
To tell EE how it should be sorted when that column is selected.
If none of the above makes any sense you’ll need some help from developer to help work through the example and set this up for you.
Thanks. Where does this code get placed and called?
You can add it to a custom functions plugin, we have some documentation on creating one here:
The support post ‘Custom Field – Registration Display’ is closed to new replies.
Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.