function mo_auth_create_form in Google Authenticator / 2 Factor Authentication - 2FA 7
Same name in this branch
- 7 configure_qrcode_authentication.inc \mo_auth_create_form()
- 7 configure_kba.inc \mo_auth_create_form()
- 7 configure_google_authenticator.inc \mo_auth_create_form()
- 7 test_kba_authentication.inc \mo_auth_create_form()
4 calls to mo_auth_create_form()
- mo_auth_configure_google_authenticator in ./
configure_google_authenticator.inc - mo_auth_configure_kba in ./
configure_kba.inc - mo_auth_configure_qrcode_authentication in ./
configure_qrcode_authentication.inc - mo_auth_test_kba_authentication in ./
test_kba_authentication.inc - Menu callback for email verification.
File
- ./
test_kba_authentication.inc, line 113 - Email verification functions.
Code
function mo_auth_create_form($form, $questions) {
$form['header']['#markup'] .= '<div class="mo2f-kba-header mo2f-kba-row">
<div class="mo2f-kba-srno">Sr. No.</div>
<div class="mo2f-kba-question">Questions</div>
<div class="mo2f-kba-answer">Answers</div>
</div>';
$i = 0;
foreach ($questions as $ques) {
$i++;
$form['header']['#markup'] .= '<div class="mo2f-kba-row">
<div class="mo2f-kba-srno">' . $i . '.</div>
<div class="mo2f-kba-question">' . $ques->question . '</div>
<div class="mo2f-kba-answer"><input class="form-control form-text" type="text" name="mo2f_kbaanswer' . $i . '" title="Only alphanumeric letters with special characters(_@.$#&+-) are allowed." pattern="(?=\\S)[A-Za-z0-9_@.$#&+-\\s]{1,100}" required="true" autofocus="true" placeholder="Enter your answer"></div>
<input type="hidden" name="mo2f_kbaquestion' . $i . '" value="' . $ques->question . '"/></div>';
}
return $form;
}