def build_registration_code_field(form_cls):
    """
    Build the appropriate field so we can render it via the extra property.
    Add field_type so Jinja knows how to render it.
    """
    if Configs.registration_code:
        field = getattr(form_cls, "registration_code", None)  # noqa B009
        field.field_type = "text"
        return [field]
    else:
        return []

    Build the appropriate field so we can render it via the extra property.
    Add field_type so Jinja knows how to render it.
    
CTFd/forms/users.py