XF 2.0 Validating & Saving (searchable) field with multiple values


Active member
I have in my own (new) content type a field with multiple values (checkboxes; up to 20 and more values).

How should I validate and save these values? Is there a XF2 class that I can use (or use as blueprint)?

Thank you!
Last edited:


Active member
I am still stuck with this problem.

What I want to do, is build a Personals section.

I'd like to have many fields, e.g. "Hobbies" with 20+ possible values (checkboxes). If the user's gender is "couple", then there should be 2 fields for hobbies of course (one for her, one for him).

And I want to be able to search for Personals (in a performant way), e.g. "show all users with hobbies 'football' and 'basketball'.

My new idea:

Build another "Display Location" named "Personals" for Profile fields like I have just done: https://xenforo.com/community/threads/add-new-display-location-for-custom-user-field.136167/

Then I would have a nice interface for editing the fields and also built-in validation.

For searching through the personals with good performance, I'd like to use ElasticSearch.

A bit of a hack, but the best solution I found so far..

Or is there some kind of custom fields framework? I don't really need a GUI for editing the fields, but the fields should be extensible later in an easy way.

Edit: Would also be a kind of patchwork with custom user fields: Think of a couple with 2 Birthday fields. There's no birthday field and no corresponding validation within custom user fields.