Property | Type | Description | |
---|---|---|---|
$app | Illuminate\Container\Container | The IoC Container | |
$bind | string | The field's bind destination | |
$element | string | The field's default element | |
$form | Former\Former\Form | The Form instance | |
$group | The field's group | ||
$isSelfClosing | boolean | Whether the Field is self-closing or not | |
$label | string | A label for the field (if not using Bootstrap) |
Method | Description | |
---|---|---|
__call ( string $method, $parameters ) | Redirect calls to the group if necessary | |
__construct ( Illuminate\Container\Container $app, string $type, $name, $label, $value, $attributes ) | Set up a Field instance | |
__toString ( ) : string | Prints out the field | |
bind ( $destination ) | Change the field's bind destination | |
forceValue ( string $value ) | Set the Field value no matter what | |
getLabel ( ) : string | Get the field's labels | |
getRules ( ) : array | Get the rules applied to the current field | |
isButton ( ) : boolean | Check if the field is a button | |
isCheckable ( ) : boolean | Check if field is a checkbox or a radio | |
isRequired ( ) : boolean | Whether the current field is required or not | |
isUnwrappable ( ) : boolean | Check if a field is unwrappable (no label) | |
label ( string $text, array $attributes = [] ) : |
Adds a label to the group/field | |
name ( string $name ) | Change the field's name | |
rule ( string $rule ) | Apply a Live Validation rule by chaining | |
rules ( $rules ) | Apply multiple rules passed as a string. | |
value ( string $value ) | Classic setting of attribute, won't overwrite any populate() attempt | |
wrapAndRender ( ) : string | Prints out the field, wrapped in its group |
Method | Description | |
---|---|---|
currentFramework ( ) : Former\Traits\Framework | Get the current framework instance |
Method | Description | |
---|---|---|
automaticLabels ( string $name, string $label ) : false | null | Ponders a label and a field name, and tries to get the best out of it | |
repopulate ( $fallback = null ) | Use values stored in Former to populate the current field |
public __construct ( Illuminate\Container\Container $app, string $type, $name, $label, $value, $attributes ) | ||
$app | Illuminate\Container\Container | |
$type | string | A field type |
protected currentFramework ( ) : Former\Traits\Framework | ||
return | Former\Traits\Framework |
public forceValue ( string $value ) | ||
$value | string | A new value |
public isCheckable ( ) : boolean | ||
return | boolean |
public isRequired ( ) : boolean | ||
return | boolean |
public isUnwrappable ( ) : boolean | ||
return | boolean |
public wrapAndRender ( ) : string | ||
return | string |
protected Container,Illuminate\Container $app | ||
return | Illuminate\Container\Container |
protected Form,Former\Former $form | ||
return | Former\Former\Form |
protected Group,Former\Form $group | ||
return |
protected bool $isSelfClosing | ||
return | boolean |
protected string $label | ||
return | string |