I would like to add to the registration form a field where the user will be able to enter the CODE/PIN. Previously given by me, in an email or on a business card attached to the previously purchased product. I would like to create a closed forum and for that I need to register with a Code, how to do it so that such a field appears and registers only people who provide a PIN for example 12345.
It is important that the code for the user is chosen by me, it can be 1 code, but it would be best if there could be many of them. Maybe there is some plugin that works well with WPForo.
Please help me
You can use wpForo User Custom Fields addon to add new fields in the registration, user profile and account pages.
I have already added the addon, but I don't know what field to add so that the Pin code has a set value/values.
<script> function validatePIN() { var enteredPIN = document.getElementById('pin').value; var allowedPINs = ['1234', '5678', '9876']; // Lista akceptowanych kodów PIN if (allowedPINs.includes(enteredPIN)) { alert('Poprawny kod PIN. Możesz się zarejestrować!'); } else { alert('Nieprawidłowy kod PIN. Spróbuj ponownie.'); } } </script>
I added this code to the HTML button, but it still doesn't work. Is there an option to change specific plugin files to add such a field?