本文整理汇总了PHP中HtmlForm::renderTextbox方法的典型用法代码示例。如果您正苦于以下问题:PHP HtmlForm::renderTextbox方法的具体用法?PHP HtmlForm::renderTextbox怎么用?PHP HtmlForm::renderTextbox使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类HtmlForm
的用法示例。
在下文中一共展示了HtmlForm::renderTextbox方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: loadForm
function loadForm($formPass)
{
$form = new HtmlForm();
$form->renderStart("resetFRM", "Enter your Email Address To Recover Password");
echo "<div>";
$form->renderTextbox("email", "Email", true, 50, "", "pattern='^\\w+@[a-zA-Z_]+?\\.[a-zA-Z]{2,3}\$'");
echo "<span id = 'sMail'></span>";
echo "</div >";
$form->renderSubmitEnd("resetForm", "Reset Password");
}
示例2: Message
$("#addButton").attr("disabled", true);
}
}
</script>
</head>
<body>
<div class="container">
<?php
$form->renderStart("createSecret", "Secret Page Data");
$form->renderTextbox("txtTitle", "Title for page", true, 50);
$form->renderTextbox("txtMessage", "Secret Message (up to 500 characters)", true, 500);
$form->renderTextbox("txtImagePath", "Image File Path (16KB image size max");
$form->renderTextbox("txtChallengeQuestion_1", "Challenge Question", true, 140);
echo "<div id = 'challenge'></div>";
$form->renderTextbox("txtChallengeAnswer_1", "Challenge Answer", true, 50);
echo "<div id = 'answer'></div>";
$form->renderTextbox("txtEmail_1", "Email:", true, 50, "", "pattern='^\\w+@[a-zA-Z_]+?\\.[a-zA-Z]{2,3}\$'");
echo "<div id = 'email'></div>";
echo "<button type='button' id='addButton' onClick='count++;addRecipient(count);' value='Add Recipients'>Add Recipients</button>";
echo "<div id = 'secret'></div>";
$form->renderSubmitEnd("submitSecret", "Submit", "Cancel");
?>
</div>
<div id="toHome">
示例3: loadForm
function loadForm($formPass)
{
//note: there are echoed divs here to help render error messages
//if the passwords do not match. The way error checking is done
//by renderTextBox does not allow for other error messages otherwise.
//I needed to improvise here - seems to work.
$form = new HtmlForm();
$form->renderStart("frmRegisterForm", "Register", true);
echo "<div >";
$form->renderTextbox("txtUsername", "Username:", true, 64, "", "pattern='^[A-Za-z0-9\\_]{3,25}\$'");
echo "<span id = 'pWord'></span>";
echo "</div>";
echo "<div>";
$form->renderTextbox("txtEmail", "Email:", true, 50, "", "pattern='^\\w+@[a-zA-Z_]+?\\.[a-zA-Z]{2,3}\$'");
echo "</div>";
echo "<div>";
$form->renderPassword("txtPassword", "Password:", true, 255);
echo "</div>";
//if the passwords entered match
if ($formPass) {
echo "<div>";
$form->renderPassword("txtRetypePassword", "Retype Password:", true, 255);
echo "</div>";
} else {
if (!$formPass && !checkPasswordMatch()) {
echo "<div>";
$form->renderPassword("txtRetypePassword", "Retype Password:", true);
if (!empty($_POST["txtRetypePassword"])) {
echo "<span class='pswdMtchFail'>does not match password entered</span>";
echo "</div>";
}
} else {
$form->renderPassword("txtRetypePassword", "Retype Password:", true);
}
}
if ($formPass) {
echo "<div>";
$form->renderTextbox("txtQst1", "Enter a challenge question: ", true, 255, "", "");
echo "</div>";
echo "<div>";
$form->renderTextbox("txtQst1Answer", "Answer: ", true, 255, "", "");
echo "</div>";
echo "<div>";
$form->renderTextbox("txtQst2", "Enter another challenge question: ", true, 255, "", "");
echo "</div>";
echo "<div>";
$form->renderTextbox("txtQst2Answer", "Answer: ", true, 255, "", "");
echo "</div>";
} else {
if (!$formPass && !checkChallengeQuestions()) {
echo "<div>";
$form->renderTextbox("txtQst1", "Enter a challenge question: ", true, 255, "", "");
echo "</div>";
echo "<div>";
$form->renderTextbox("txtQst1Answer", "Answer: ", true, 255, "", "");
echo "</div>";
echo "<div>";
$form->renderTextbox("txtQst2", "Enter another challenge question: ", true, 255, "", "");
echo "<span class='QstMtchFail'>Your challenge questions cannot be the same</span>";
echo "</div>";
echo "<div>";
$form->renderTextbox("txtQst2Answer", "Answer: ", true, 255, "", "");
echo "</div>";
} else {
if (!$formPass && checkChallengeQuestions()) {
echo "<div>";
$form->renderTextbox("txtQst1", "Enter a challenge question: ", true, 255, "", "");
echo "</div>";
echo "<div>";
$form->renderTextbox("txtQst1Answer", "Answer: ", true, 255, "", "");
echo "</div>";
echo "<div>";
$form->renderTextbox("txtQst2", "Enter another challenge question: ", true, 255, "", "");
echo "</div>";
echo "<div>";
$form->renderTextbox("txtQst2Answer", "Answer: ", true, 255, "", "");
echo "</div>";
}
}
}
$form->renderSubmitEnd("subRegisterSubmit", "Register");
}
示例4: HtmlForm
$form = new HtmlForm();
?>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.0/css/bootstrap.min.css">
<link type=text/css" rel="stylesheet" href="style/SecretStyles.css" />
<title>Login</title>
</head>
<body>
<div class="container">
<?php
$form->renderStart("loginForm", "Enter your username and password");
$form->renderTextbox("username", "Username", true);
$form->renderPassword("password", "Password", true);
$form->renderSubmitEnd("submitLogin", "Submit");
?>
<div id="linking">
<p> Don't have an account?<a href="register.php" > Click Here</a> to register!</a></p>
<p>Forgot Your Password? <a href="ResetPassword.php">click here</a> to reset your password</p>
</div>
</div>
<div id="toExplore">
//Insert Image Link Here
</div>
</body>
</html>
示例5: Message
}
else
{
$("#addButton").attr("disabled", true);
}
}
</script>
</head>
<body>
<div class="container">
<?php
if (isset($_SESSION["loggedIn"])) {
$form->renderStart("createSecret", "Secret Page Data");
$form->renderTextbox("txtTitle", "Title for page", true, 50);
$form->renderTextbox("txtMessage", "Secret Message (up to 500 characters)", true, 500);
$form->renderTextbox("txtImagePath", "Image File Path (16KB image size max");
$form->renderTextbox("txtChallengeQuestion_1", "Challenge Question", true, 140);
echo "<div id = 'challenge'></div>";
$form->renderTextbox("txtChallengeAnswer_1", "Challenge Answer", true, 50);
echo "<div id = 'answer'></div>";
$form->renderTextbox("txtEmail_1", "Recipient Email", false, 50);
echo "<div id = 'email'></div>";
echo "<button type='button' id='addButton' onClick='count++;addRecipient(count);' value='Add Recipients'>Add Recipients</button>";
$form->renderSubmitResetRED("submitSecret", "Submit", "Cancel");
} else {
$form->renderStart("createSecret", "Secret Page Data");
$form->renderTextbox("txtTitle", "Title for page", false, 50);
$form->renderTextbox("txtMessage", "Secret Message (up to 500 characters)", true, 500, "", "id=txtMessage");
$form->renderTextbox("txtImagePath", "Image File Path (16KB image size max)");