Public registration
You can also open your survey to the public and still use access codes. To do this, set the access mode to Link with access code and switch on Allow public registration in the participant settings of the survey. People who visit your survey's URL without an access code can then register.
If a person provides an email address that is not already in the participant list, LimeSurvey adds them to the list and emails them an invitation with their personal access code.
CAPTCHAs in public registration
To protect your survey from robot registrations, a CAPTCHA can be activated for the registration, save and load forms. For more details, read our page on participant settings.
How do I make first and last name required in public registration?
If your survey has a participant list and allows public registration, people can register themselves: they fill in a registration form and get their own access code. On that form, only the email address is required:

To make the first name and last name required too, change the registration form in your own theme. For Fruity TwentyThree, extend the theme first and use the copy. In the theme editor, choose Registration under Screen and open the file register_form.twig. The email field shows how a required field is built:
{# Participants email #}
<div class='{{ aSurveyInfo.class.registerformcolrowc }} row mb-3' {{ aSurveyInfo.attr.registerformcolrowc }}>
<label {{ aSurveyInfo.attr.registerformcolrowclabel }} class='{{ aSurveyInfo.class.registerformcolrowclabel }} control-label'> {{ gT("E-mail") }} {{ include('./subviews/registration/required.twig') }}</label>
<div {{ aSurveyInfo.attr.registerformcolrowcdiv }} >
{{ C.Html.emailField('register_email', aSurveyInfo.sEmail, ({'id' : 'register_email','class' : 'form-control ls-important-field','required' : true, 'placeholder' : gT('Enter e-mail address', 'unescaped')})) }}
</div>
</div>
Change the first name and last name fields the same way:
- Add
{{ include('./subviews/registration/required.twig') }}to the label. This shows the asterisk. - Add
'required' : trueto the options of the text field. This makes the field mandatory.
The edited fields should look like this (the example is from LimeSurvey 7.x; in 6.x, the placeholder texts are written without 'unescaped'):
{# Participants first name #}
<div class='{{ aSurveyInfo.class.registerformcolrow }} col-md-6 col-12 mb-3 mb-md-0' {{ aSurveyInfo.attr.registerformcolrow }}>
<label for='register_firstname' class='{{ aSurveyInfo.class.registerformcolrowlabel }} control-label '>{{ gT("First name") }} {{ include('./subviews/registration/required.twig') }}</label> {# extra label #}
<div class="">
{{ C.Html.textField('register_firstname', aSurveyInfo.sFirstName, ({'id' : 'register_firstname','class' : 'form-control ls-important-field', 'required' : true, 'placeholder' : gT('Enter your first name', 'unescaped') })) }} {# mandatory field #}
</div>
</div>
{# Participants last name #}
<div class='{{ aSurveyInfo.class.registerformcolrowb }} col-md-6 col-12' {{ aSurveyInfo.attr.registerformcolrowb }}>
<label {{ aSurveyInfo.attr.registerformcolrowblabel }} class='{{ aSurveyInfo.class.registerformcolrowblabel }} control-label '>{{ gT("Last name") }} {{ include('./subviews/registration/required.twig') }}</label> {# extra label #}
<div {{ aSurveyInfo.attr.registerformcolrowbdiv }} >
{{ C.Html.textField('register_lastname', aSurveyInfo.sLastName, ({'id' : 'register_lastname', 'class' : 'form-control ls-important-field', 'required' : true, 'placeholder' : gT('Enter your last name', 'unescaped')})) }} {# mandatory field #}
</div>
</div>
Click Copy to local theme and save changes. Then select the theme for your survey (see Use your theme in a survey) and test the registration form.
The public registration form now shows all three fields as required:
