Other adding simple invite code to system (XF 1.5.16a)

zoldos

Well-known member
The below code is kind of what I need. It works, but I can't seem to incorporate it, or something similar, into my 1.5.16a registration system. Basically, I just need to require new members input an "access code" somewhere during the signup process, and not allow them to continue unless it is correct.

Can can anyone point me in the right direction and/or help? Thanks!

Code:
<script>
function validateForm() {
   var x = document.forms["myForm"]["fname"].value;
   if (x != "QuadNode1") {
       alert("Wrong Access Code!");
       return false;
   }
}
</script>
    <form name="myForm" action="" onsubmit="return validateForm()" method="post">
    <span style="color:white;">Access Code:</span>
        <span style="color:white;">{xen:phrase required}
    <input type="text" name="fname" size="8">
    </form>
 
@zoldos have you found any mean to achieve such a goal as described in your first post?

I've tried to use the Q&A but the problem is that if you input a Question to use so that no one can register if he doesn't have the code, the same code is also used in the contact form on the forum so no one can contact you.

I'm using the Invite system from Xencentral but in the new forum I'd like to use another system to make that only invited people can register so I'm curious on what you've found.
 
@zoldos have you found any mean to achieve such a goal as described in your first post?

I've tried to use the Q&A but the problem is that if you input a Question to use so that no one can register if he doesn't have the code, the same code is also used in the contact form on the forum so no one can contact you.

I'm using the Invite system from Xencentral but in the new forum I'd like to use another system to make that only invited people can register so I'm curious on what you've found.
Custom user fields use that instead of questions answers with php callback for validation

https://xenforo.com/community/resources/custom-user-field-callback-validate-value.379/
 
@zoldos have you found any mean to achieve such a goal as described in your first post?

I've tried to use the Q&A but the problem is that if you input a Question to use so that no one can register if he doesn't have the code, the same code is also used in the contact form on the forum so no one can contact you.

I'm using the Invite system from Xencentral but in the new forum I'd like to use another system to make that only invited people can register so I'm curious on what you've found.
I had to stop using it for this reason (contact form). I simply closed my forum and manually create new members if requested. :)
 
Back
Top Bottom