Exemple #1
0
                                        <td><?php 
echo $form->field($model, "city")->label(false);
?>
</td>
                                    </tr>
                                    <tr>
                                        <td>State:</td>
                                        <td><?php 
echo $form->field($model, "state")->dropDownList(\frontend\controllers\Common::$states)->label(false);
?>
</td>
                                    </tr>
                                    <tr>
                                        <td>Zip:</td>
                                        <td><?php 
echo $form->field($model, "zip")->widget(MaskedInput::className(), ['mask' => '9', 'clientOptions' => ['repeat' => 5, 'greedy' => false]])->label(false);
?>
</td>
                                    </tr>
                                    </tbody>
                                </table>
                            </div>
                        </div>
                    </div>
                    <div class="panel-footer" style="text-align: right">
                        <?php 
echo Html::submitButton($model->isNewRecord ? 'Create' : 'Update', ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']);
?>
                    </div>

                </div>
Exemple #2
0
?>
            <?php 
echo $form->field($model, 'sex', ['options' => ['class' => 'col-sm-6'], 'horizontalCssClasses' => ['wrapper' => 'col-sm-12', 'offset' => null]])->inline()->radioList(array(1 => 'Male ', 0 => ' Female'), ['class' => 'col-sm-12'])->label(false);
?>
        </div>

        <?php 
echo $form->field($model, 'city', ['template' => '{label}<div class="col-sm-12">{input}{error}</div>{hint}'])->textInput(['placeholder' => 'City'])->label(false);
?>

        <div class="row">
        <?php 
echo $form->field($model, 'state', ['template' => '{label}<div class="state-input">{input}{error}</div>{hint}', 'options' => ['class' => 'col-sm-6']])->dropDownList($states)->label(false);
?>
        <?php 
echo $form->field($model, 'zip', ['template' => '{label}<div class="col-sm-12">{input}{error}</div>{hint}', 'options' => ['class' => 'col-sm-6']])->widget(MaskedInput::className(), ['mask' => '9', 'clientOptions' => ['repeat' => 5, 'greedy' => false], 'options' => ['class' => 'form-control', 'placeholder' => "Zip"]])->label(false);
?>
        </div>

        <div> What year did you graduate High School?</div>
        <?php 
echo $form->field($model, 'graduate_high_school', ['template' => '{label}<div class="col-sm-6">{input}{error}</div>{hint}', 'options' => ['class' => 'form-group']])->dropDownList(\frontend\controllers\Common::graduate_years())->label(false);
?>

        <div style="text-align: center">
            <?php 
echo Html::submitButton('Register', ['class' => 'btn btn-primary', 'name' => 'signup-button']);
?>
        </div>
        <?php 
ActiveForm::end();