Skip to content

Instantly share code, notes, and snippets.

View Asgaroth's full-sized avatar

Alex Urbano Asgaroth

View GitHub Profile
@Asgaroth
Asgaroth / yf3-form.php
Created July 5, 2012 03:13
Yii Foundation 3 Form
<?php
/**
* @var FounActiveForm
*/
$form=$this->beginWidget('foundation.widgets.FounActiveForm', array(
'id'=>'form',
)); ?>
//form Fields
@Asgaroth
Asgaroth / yf3-form-fields.php
Created July 5, 2012 03:25
Yii Foundation 3 Form Fields
<?php
/**
* @var FounActiveForm
*/
$form=$this->beginWidget('foundation.widgets.FounActiveForm'); ?>
?>
<?php echo $form->textFieldRow($model, "field1", array("placeholder" => "Standard Input")); ?>
<?php echo $form->textFieldRow($model, "field1_1", array("placeholder" => "Street")); ?>
<div class="row">
<div class="six columns">
@Asgaroth
Asgaroth / yf3-formh.php
Created July 14, 2012 23:48
Yii Foundation 3 Form Horizontal
<?php $form=$this->beginWidget('foundation.widgets.FounActiveForm'); ?>
<div class="row">
<div class="two mobile-one columns">
<?php echo $form->labelEx( $model, "field3", array("class" => 'right')); ?>
</div>
<div class="ten mobile-three columns">
<?php echo $form->textField( $model, "field3", array("placeholder" => "e.g. Home", "class" => 'eight')); ?>
</div>
</div>
<div class="row">
@Asgaroth
Asgaroth / yf3-form-fielset.php
Created July 15, 2012 00:01
Yii Foundation 3 Form Fieldset
<fieldset>
<legend>Fieldset Name</legend>
<?php echo $form->textFieldRow($model, "field6", array('placeholder' => 'Standard Input')); ?>
<?php echo $form->textFieldRow($model, "field7"); ?>
<?php echo $form->textField($model, "field8", array('class' => 'six')); ?>
</fieldset>
@Asgaroth
Asgaroth / yf3-form-prefix.php
Created July 15, 2012 20:07
Yii Foundation 3 Form Prefix
<div class="row">
<div class="four columns">
<?php echo $form->textFieldRow($model, "field9", array('prefix' => '#')); ?>
</div>
</div>
@Asgaroth
Asgaroth / yf3-form-postfix.php
Created July 15, 2012 20:11
Yii Foundation 3 Form Postfix
<div class="row">
<div class="five columns">
<?php echo $form->textFieldRow($model, "field10", array('postfix' => '.com',
'postfixOptions' => array(
'size' => 3,
))); ?>
</div>
</div>
@Asgaroth
Asgaroth / yf3-form-postfix-btn.php
Created July 15, 2012 21:31
Yii Foundation 3 Form Postfix Button
<div class="row">
<div class="five columns">
<?php echo $form->textFieldRow($model, "field11", array(
'postfix' => '<a href="#" class="postfix button">Search</a>',
'postfixOptions' => array(
'size' => 4,
'type' => 'raw'
))); ?>
</div>
</div>
@Asgaroth
Asgaroth / f3-form-errors.php
Created July 15, 2012 21:37
Yii Foundation 3 Form Errors
<div class="row">
<div class="five columns">
<?php echo $form->textFieldRow($model, "field12"); ?>
</div>
<div class="five columns end">
<?php echo $form->textFieldRow($model, "field13"); ?>
</div>
</div>
@Asgaroth
Asgaroth / f3-form-example.php
Created July 15, 2012 21:53
Yii Foundation 3 Large Form Example
<?php $form=$this->beginWidget('foundation.widgets.FounActiveForm'); ?>
<fieldset>
<legend>Large Form Example</legend>
<div class="row">
<div class="five columns">
<?php echo $form->textFieldRow($model, "field14"); ?>
<?php echo $form->textFieldRow($model, "field15"); ?>
<?php echo $form->textFieldRow($model, "field16", array('prefix' => '@', 'placeholder' => 'asgarothbelem')); ?>
<?php echo $form->textFieldRow($model, "field17", array(
'postfix' => '.com',
@Asgaroth
Asgaroth / f3-custom-form.php
Created July 15, 2012 21:56
Yii Foundation 3 Custom Form
<?php $form=$this->beginWidget('foundation.widgets.FounActiveForm', array(
"type" => 'custom'
)); ?>
<?php $this->endWidget(); ?>