Shortcut for getting or setting “value” attribute
When setting a value, it returns $this (for fluent interface).
Example
$value = $inputfield->val(); * // Getting
$inputfield->val('foo'); * // Setting
Usage
// basic usage
$mixed = $inputfield->val();
// usage with all arguments
$mixed = $inputfield->val($value = null);
Arguments
Name | Type(s) | Description |
---|---|---|
value (optional) | string, null |
Return value
mixed
Inputfield methods and properties
API reference based on ProcessWire core version 3.0.236