XF 2.0 Adding Custom Registration Box

Kangy

Member
My forum is fora Facebook group and requires manual moderator approval to confirm they are members of the group. I would like to add a field to the registration for them to put their Facebook name in. However, I want this field to be hidden from their profile by default. Is there an addon or customization that I can do to the registration page.

Situation. Member Jim Jones signs up with username HamRadio1974. As of right now I have to keep posting in the facebook group reminding people to message me theire username so that I know to approve their site registration. If they had an option for them to add 'Jim Jones' to a Note field or something that is hidden from their profile view but able to be seen by Admin that would be amazing.
 
Go to Admin > Users > Custom user fields and create a new field.

Under "General options" set it up like this:

1508198438062.webp

That will make the field required, make it editable by the user and only once and show it during registration. It will essentially mean the field will only be seen during registration and nowhere else (unless a moderator/admin is editing the user) and the user will need to enter a value to be able to complete the registration form.

Oh and under "Options for text fields" you can select "Validator" and type "Facebook" under "Value match requirements" and this will also ensure a value is entered in the expected format.

Because the user change log details are shown in the Approval queue, the value of the Facebook field should be shown there.
 
Awesome, if I use the current Facebook contact field and change the settings as you have listed. Is there a way to force existing members to update it on their next login?
 
The only reason I didn't suggest using the existing one is in case people wanted to have it on their profile as well, in which case for your purposes you'll probably want the two fields but, yeah, you can just use the existing one if you wish.

Unfortunately there is no way to force it for existing users.
 
Also, how do I view the text from the field as a moderator? It does not show up in the approval queue. The only way I could find what the test user input contained was going into edit user via admin. If I have forum moderators is there a way they can view it also?
 
How does the Validator work. I just did a test registration with nofacebook in the field with and it still let the test user register.
Oh it only detects whether the string might be valid for a Facebook profile. e.g. if you type "dfsdf sdf sdf dfs fs" that would fail because it has spaces in. In fact the only characters allowed are a-z A-Z 0-9 and dot. It will also allow you to paste in your full Facebook profile URL and it will extrapolate the ID from that.

Also, how do I view the text from the field as a moderator? It does not show up in the approval queue. The only way I could find what the test user input contained was going into edit user via admin. If I have forum moderators is there a way they can view it also?
We show the user change log details if we believe if it is possible the user could be a spammer (generally new, non-staff accounts). If you're testing this by setting the approval state on an existing user who perhaps has been around a while or staff then this is why.
 
hmm, ya, it was a fresh registration. I used an incognito window, clean session. Pretending I was a new registration, it did require input into the facebook box which was good, got the confirmation email, clicked ok, test user still not able to view forums (waiting registration permissions is set that way). Then I switched over and logged into my admin account, saw the new Test User in the queue but the input from the facebook field was not viewable anywhere.
 
On reflection, that might be because we don't log a registration as a "change" as such because they're all new values rather than changes.

As an admin you can only edit a user from the Admin CP.

As a moderator, if you have the "Edit basic user profiles" option then there's a special member edit page.

You can access that by going to the user's profile, clicking the menu and selecting "Edit".

However, you might just want to edit the template, approval_item_user:

Above:
HTML:
<xf:macro template="approval_queue_macros" name="spam_log" arg-spamDetails="{$spamDetails}" />

Add:
HTML:
<xf:formrow label="{{ phrase('custom_fields') }}">
<xf:macro template="custom_fields_macros" name="custom_fields_view"
   arg-type="users"
   arg-group="{{ null }}"
   arg-set="{$content.Profile.custom_fields}"
   arg-valueClass="pairs pairs--rows" />
</xf:formrow>
 
I'm reading this @Chris D and @Kangy .. but having a little trouble trying to figure out how to implement on my side. I'd like to put an additional check box where the "receive news" and "I agree to the terms.." check boxes are right above the register button and have that checkbox recorded as being checked, but not shown on the site to others -- just something we'd see as having been checked off (if that part is possible) at the very least though we really kinda need it with those other two check boxes and I don't see how to do that. :(

Any help would be really appreciated. Thanks guys!
 
Top Bottom