当前位置: 首页>>代码示例>>PHP>>正文


PHP FormBuilder::CreateStandardInput方法代码示例

本文整理汇总了PHP中FormBuilder::CreateStandardInput方法的典型用法代码示例。如果您正苦于以下问题:PHP FormBuilder::CreateStandardInput方法的具体用法?PHP FormBuilder::CreateStandardInput怎么用?PHP FormBuilder::CreateStandardInput使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在FormBuilder的用法示例。


在下文中一共展示了FormBuilder::CreateStandardInput方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: PrintFormFormForReEntry

function PrintFormFormForReEntry($Type)
{
    $CurrentPage = htmlspecialchars($_SERVER["PHP_SELF"]);
    //Determinte the introduction to give to the form.
    if ($Type == 0) {
        echo 'Error, Please Compleate form bellow:</br></br>';
    } elseif ($Type == 1) {
        echo 'Error, Incorrect Username or Password:</br></br>';
    }
    require 'FormBuilder.php';
    $FormCreator = new FormBuilder();
    echo '<span id=LogInFormContainer>';
    echo $FormCreator->StartForm($PageCreationInstruction = array("Methord" => "post", "Action" => 1, "id" => "LogInForm"));
    $InputsRequired = array(array("InputLabel" => "UserName: ", "OptInputHTMLSeperator" => "<br>", "Options" => array(array('type', 'text'), array('value', $_POST["RAWUserName"]), array("maxlength", 100), array("name", "RAWUserName"))), array("InputLabel" => "Password: ", "Options" => array(array('type', 'password'), array("maxlength", 100), array("name", "Password"))));
    echo $FormCreator->CreateStandardInput($InputsRequired);
    echo '<br>';
    echo $FormCreator->CreateSubmitButton();
    echo $FormCreator->EndForm();
    echo '<span/>';
    /*
    	//Print the form to the page.
    	echo "<form method=\"post\" action=\"$CurrentPage\" >"; //Submits Data to self
    
    	if(isset($_POST["RAWUserName"])){//Add the submitted user name if avaliable
    	echo 'User: <input type="text" name="RAWUserName" value="' . $_POST["RAWUserName"] . '"/></br>';
    	}else{
    		echo 'User: <input type="text" name="RAWUserName" /></br>';
    	}
    	echo 'Password: <input type="Password" name="Password"/></br>';
    	echo '</br>';
    	echo '<input type="submit" value="Log In"/>';
    	echo "</form>";
    */
}
开发者ID:Ro5635,项目名称:EE1EPE,代码行数:34,代码来源:LogIn.inc.php

示例2: FormBuilder

<?php

//This is the send message form, include it in any location that you wish to have the messages submit form:
//Really need to not use this formbuilder...
require 'FormBuilder.php';
$FormCreator = new FormBuilder();
echo '<span id=SendMessageFormContainer>';
echo $FormCreator->StartForm($PageCreationInstruction = array("Methord" => "post", "Action" => 1, "id" => "SendMessageForm", "class" => "UserForm"));
echo '<span id="NameTextBoxLabel">Name:</span>';
echo '<span id="NameTextBoxContainer">';
$InputsRequired = array(array("OptInputHTMLSeperator" => "<br>", "Options" => array(array('type', 'text'), array('value', $_POST["Name"]), array("maxlength", 20), array("name", "Name"), array("id", "NameTextBox"))));
echo $FormCreator->CreateStandardInput($InputsRequired);
echo '</span><span id="EmailText">Email: </span><span id="EmailInputBound"><br><input type="text" name="emailAddressInput" id="emailAddressInput"/></span><br><br>Message:';
if (isset($_POST['UserMessage'])) {
    $TextArreaContents = $_POST['UserMessage'];
} else {
    $TextArreaContents = "";
}
echo '<textarea name="UserMessage" id="UserMessage">' . $TextArreaContents . '</textarea>';
echo '<br><br><span id="GoogleAntiSpanStyleBuffer"></span>';
//Google Recaptcha:
echo '<div id="html_element"></div>';
echo '<br><br><span id="submitMessageFormButtonContainer"><button id="submitMessage" type="submit">Submit Message</button></span>';
echo $FormCreator->EndForm();
?>
	
	
		

		
开发者ID:Ro5635,项目名称:EE1EPE,代码行数:25,代码来源:SendMessage.Inc.php


注:本文中的FormBuilder::CreateStandardInput方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。