本文整理汇总了PHP中FormHelper::selectFromTable方法的典型用法代码示例。如果您正苦于以下问题:PHP FormHelper::selectFromTable方法的具体用法?PHP FormHelper::selectFromTable怎么用?PHP FormHelper::selectFromTable使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FormHelper
的用法示例。
在下文中一共展示了FormHelper::selectFromTable方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: array
<label>Cliente</label>
<br/>
<?php
echo $cont['nome'];
echo $cont['email'] != "" ? "<br/><a href='mailto:" . $cont['email'] . "'>" . $cont['email'] . "</a>" : "";
echo $cont['telefone'] != "" ? "<br/>" . $cont['telefone'] : "";
?>
<br/>
<input type="hidden" name="contato_id" id="contato_id" value="<?php
echo $r['contato_id'];
?>
"/>
<?php
//FormHelper::selectFromTable('contato.id','nome','Contato',$r['contato_id'],array(),array('id'=>$r['contato_id']));
} else {
FormHelper::selectFromTable('contato.id', 'nome', 'Contato', $cliente, array('validation' => array('regex' => FormHelper::IS_SELECTED, 'message' => 'Selecione um <strong>contato</strong>.')), array('cliente_id' => $cliente));
}
?>
<div class="row">
<div class="col-md-6">
<?php
FormHelper::input('valor', 'Valor', $r['valor'], array());
?>
</div>
<div class="col-md-6">
<?php
FormHelper::input('custo', 'Custo', $r['custo'], array());
?>
</div>
</div>
<input type='hidden' value='0' id="finalizar" name='finalizar'/>
示例2: array
<div class="modal-header"><h2>Inserir endereço</h2></div>
<div class="modal-body">
<?php
$cep = Request::value('cep');
$logradouro = Request::value('logradouro');
$numero = Request::value('numero');
$bairro = Request::value('bairro');
$cliente_endereco_tipo_id = Request::value('cliente_endereco_tipo_id');
$cidade = Request::value('cidade');
$estado = Request::value('estado');
FormHelper::create('formEndereco');
?>
<div class="row">
<div class="col-md-12">
<?php
FormHelper::selectFromTable('cliente_endereco_tipo.id', 'descricao', 'Tipo de contato', $cliente_endereco_tipo_id);
?>
</div>
</div>
<div class="row">
<div class="col-md-5">
<?php
FormHelper::input('cep', 'CEP', $cep, array('placeholder' => 'Digite o CEP', 'onkeyup' => 'App.Endereco.BuscarCep(this.value)'));
?>
</div><br/>
<div id="cepinvalido" class="col-md-5 well-sm alert-danger hide">
<span class="glyphicon glyphicon-remove-circle"></span> CEP inválido.
</div>
</div>
<div class="row">
<div class="col-md-7">