Page::getFieldsByUse($usetype[,$usetype...])

Version 3.8

Get fields that implement given use type

Get all fields of the page that are of certain use type:
date Date
time Time
date time Exact date and time
amount Countable value
contact Contact information
location Location data
reference Reference to another page

Return value

Array Array of Field

Arguments

$usetype
1. String: Comma delimited list of use types
2. Array: List of use types

Full documentation

Show all contact information from order: (phone, email, address...)

foreach ( $Order->getFieldsByUse('contact') as $Field ){
    $txt .= "<p>{$Field->getTitle()}: {$Field->getValue()}</p>";
}