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


PHP Select::setName方法代码示例

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


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

示例1: testVerificaSeOsDadosForamInseridos

 public function testVerificaSeOsDadosForamInseridos()
 {
     $select = new Select();
     $select->setId("selectCat");
     $select->setName("categoria");
     $select->setClass("form-control");
     $select->setProtected("protected");
     $select->setLabel("Categoria");
     $select->setAlert("Erro no field.");
     $this->assertEquals("selectCat", $select->getId());
     $this->assertEquals("categoria", $select->getName());
     $this->assertEquals("form-control", $select->getClass());
     $this->assertEquals("protected", $select->getProtected());
     $this->assertEquals("Categoria", $select->getLabel());
     $this->assertEquals("Erro no field.", $select->getAlert());
 }
开发者ID:joohnsro,项目名称:TestesAutomatizadosProjFinal,代码行数:16,代码来源:SelectTest.php

示例2: isset

  <head>
    <meta charset="utf-8">
    <title>Form Class</title>
  </head>
  <body>
    <form class="" action="task13.php" method="post">
        <input type="text" name="name" value="<?php 
echo isset($_POST['name']) ? $_POST['name'] : '';
?>
">
        <input type="text" name="username" value="<?php 
echo isset($_POST['username']) ? $_POST['username'] : '';
?>
">
        <input type="text" name="email" value="<?php 
echo isset($_POST['email']) ? $_POST['email'] : '';
?>
">
        <?php 
$select = new Select();
$select->setName('browser');
if (isset($browserTypes)) {
    $select->setValue($browserTypes);
    $select->makeSelect();
}
?>
        <input type="submit" name="submit" value="Submit">
    </form>
  </body>
</html>
开发者ID:nestedminds,项目名称:basic-course-rajanam,代码行数:30,代码来源:task13.php

示例3: Select

$selectBrowser = new Select();
$selectBrowser->setName('browser');
echo '<p>Work Access</p>';
if (isset($browserTypes)) {
    $selectBrowser->setValue($browserTypes);
    $selectBrowser->makeSelect();
    unset($selectBrowser);
}
echo '<p>Connection Speed</p>';
$selectSpeed = new Select();
$selectSpeed->setName('speeds');
if (isset($speeds)) {
    $selectSpeed->setValue($speeds);
    $selectSpeed->makeSelect();
    unset($selectSpeed);
}
echo '<p>Operating System</p>';
$selectOs = new Select();
$selectOs->setName('os');
if (isset($os)) {
    $selectOs->setValue($os);
    $selectOs->makeSelect();
    unset($selectOs);
}
?>
          <input type="submit" name="submit" value="Submit">
      </form>
    </div>
  </body>
</html>
开发者ID:nestedminds,项目名称:basic-course-rajanam,代码行数:30,代码来源:task14.php

示例4: Form

include_once './inc/menubar.php';
$body->line("Index creation on table : <b>" . $req->get('table') . "</b><br>");
$form = new Form();
$form->setAction('controller.php');
$form->setJs(' onsubmit="return PSA.indexcol();" ');
$form->build();
// TODO: check if table name already exists
$name = new Input();
$name->setName('idxname');
$name->setSize(50);
$name->setMaxlength(128);
$name->setId('idxname');
$body->line('Name : ' . $name->dump() . ' ' . $cmd->dump() . '<br>');
for ($i = 0; $i < sizeof($fields); ++$i) {
    $select = new Select();
    $select->setName('col' . $i);
    $select->setSize(1);
    $select->add('', '-');
    for ($j = 0; $j < sizeof($fields); ++$j) {
        $select->add($fields[$j], $fields[$j]);
    }
    $body->line('index on : ' . $select->dump() . '<br>');
}
$submit->build();
$tblname = new Input();
$tblname->setName('tblname');
$tblname->setSize(128);
$tblname->setValue($req->get('table'));
$tblname->setType('hidden');
$tblname->build();
unset($form);
开发者ID:broozer,项目名称:psa,代码行数:31,代码来源:index_add.php

示例5: Select

				</p>
				<p>
				  Username:
				  <input type="text" name="username" size="60" />
				</p>
				<p>
				  Email:
				  <input type="text" name="email" size="60" />
				</p>
				<p>
				  Browser:
				  <?php 
    //Instantiate object
    $browser = new Select();
    //Set properties
    $browser->setName('browser');
    $browser->setValue($browsers);
    //The object has the data it needs from the preceding commands.
    //Tell it to make the select field.
    $browser->makeSelect();
    ?>
				</p>
				<p>
				  <input type="submit" name="submit" value="Go" />
				</p>
			</form>
			<?php 
    //If form submitted, process input.
} else {
    //Retrieve user responses.
    $name = $_POST['name'];
开发者ID:bogdanbuciu,项目名称:invendium-practice,代码行数:31,代码来源:php_ex15.php

示例6: Th

$table->build();
$th = new Th();
$th->add('name');
$th->add('type');
$th->add('primary');
$th->add('size');
$th->add('null');
$th->add('default');
$th->build();
$colname = new Input();
$colname->setName('colname');
$colname->setSize(25);
$colname->setMaxlength(128);
$colname->setId('colname');
$coltype = new Select();
$coltype->setName('coltype');
$coltype->setSize(1);
$coltype->setId('coltype');
$coltype->add('VARCHAR', 'VARCHAR');
$coltype->add('INTEGER', 'INTEGER');
$coltype->add('FLOAT', 'FLOAT');
$coltype->add('TEXT', 'TEXT');
$coltype->add('DATETIME', 'DATETIME');
$colprime = new Input();
$colprime->setName('colprime');
$colprime->setType('checkbox');
$colprime->setId('colprime');
$colprime->setJs(' onclick="PSA.checkprimary();" ');
$colsize = new Input();
$colsize->setName('colsize');
$colsize->setSize(7);
开发者ID:broozer,项目名称:psa,代码行数:31,代码来源:table_add.php


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