4.3 User criteria
User criteria in XenForo are part of the core. The core software utilises it in different places and many add-ons include user criteria in the add-on options. The Advanced Forms addon does it, too. It works the same way it does everywhere.
Important to note is that if you want to display a type to your users, you must pick at least one criteria so it "knows" under which circumstance it is displayed and used. If you do not select at least one criteria, you will not be able to save a type.
I will not attempt to explain every criteria as everyone has individual cases and needs. But I will shortly talk about the most important criteria which will be used primarily all the time in most cases.
4.3.1 User groups
Every registered user's primary usergroup including admins and moderators should be the registered usergroup.
Which means by selecting the registered usergroup, the criteria targets every registered user. This is the "default" way of allowing registered users to use a form or a type.
Same target can be achieved by the negation:
If you want to target ALL people, registered and unregistered, then you do like this:
(Note: by holding down the CTRL button you can pick more than one choice).
You can combine every criteria and make the target group smaller. It depends on what you want to do and your case. As example I set this criteria additionally:
Then, I must be in the relevant usergroup AND have posted at least 10 messages. It is not enough to meet one criteria, all must be met.
Warning:
As the description for user groups says: if a user is a member of any of the selected user groups, the criteria is met. So say, if you picked "administrative and moderating" as criteria, it is enough for me to be a moderator to meet the criteria. I don't need to be in both usergroups, one is enough. This only applies to the usergroup criteria. Outside you must meet all of them.
Note:
There can be cases where you want a user to be in usergroup A
and B.
By default in XF it is not possible to target that.
But there is a trick you can do in the Advanced Forms addon, which only works in this addon. If you create a type and a form, you can set for both a user group criteria. Which means in order to see the type, you can select user group A. In order to see the form which is inside the type, you can select user group B. That means the user must be in both user groups in order to see that form. He needs to be in usergroup A to see the type, and in usergroup B to see the form which belongs to that type.