x

主要章節

  1. Get started
  2. Workspace
  3. Editor
  4. Question types
  5. Share
  6. Results
  7. Configuration
  8. Installation and updates
  9. Profile and personal settings
  10. Account and billing
  11. FAQs
  12. Development
 Actions

公開註冊

From LimeSurvey Manual

您也可以利用使用權杖時提供的受訪者控制類型,將問卷開放給公眾。若要這麼做,請初始化您的問卷參與者表,並在主要問卷設定中選擇允許公開註冊。未持有權杖而造訪您問卷網址的人將有機會註冊。(此設定日後可在問卷設定選單中的參與者設定區段中變更)。

如果參與者提供的電子郵件地址不在目前的資料庫中,系統將在問卷參與者表中建立一筆記錄,並向其發送包含專屬權杖代碼的邀請電子郵件。

公開註冊中的驗證碼

為了保護您的問卷免受機器人註冊,可以為所有註冊、儲存和載入表單啟用驗證碼功能。如需詳細資訊,請參閱我們關於參與者設定的說明。


如何將公開註冊的所有欄位都設為必填?

如果您使用問卷參與者表,同時也允許公開註冊,想要參加的人需填寫註冊表單,其中包含名、姓和電子郵件地址。只有電子郵件地址為必填:


公開註冊表單:名和姓為選填,只有電子郵件標有星號為必填,並有「立即註冊」按鈕


若要將名和姓也設為必填,請編輯您問卷佈景主題的註冊表單。以 Fruity TwentyThree 為例,請先延伸佈景主題,開啟該副本的佈景主題編輯器,然後編輯檔案 views/subviews/registration/register_form.twig。電子郵件欄位展示了必填欄位的建構方式:

        {# 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>

以相同方式修改名和姓欄位:

  • 在標籤中加入 {{ include('./subviews/registration/required.twig') }}。這會顯示星號。
  • 在文字欄位的選項中加入 'required' : true。這會使該欄位成為必填。

編輯後的欄位應如下所示(此範例來自 LimeSurvey 7.x;在 6.x 中,占位符文字不含 '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>


按一下複製到本機佈景主題並儲存變更。然後為您的問卷選擇該佈景主題(請參閱在問卷中使用您的佈景主題),並測試註冊表單。

公開註冊表單現在會將三個欄位全部顯示為必填:


公開註冊表單:名、姓和電子郵件均標有星號為必填,並有「立即註冊」按鈕


另請參閱

本頁面可能為機器翻譯,可能包含錯誤。 檢視英文原文 · 改善此翻譯