$pagesaveFields()

Save only the given named fields for this page

Available since version 3.0.242.

Usage

// basic usage
$array = $page->saveFields($fields);

// usage with all arguments
$array = $page->saveFields($fields, array $options = []);

Arguments

NameType(s)Description
$fieldsarray string

Array of field name(s) or string (CSV or space separated)

$options (optional)array

See Pages::save() documentation for options.

Return value

array

Names of fields that were saved

Exceptions

Method can throw exceptions on error:

  • WireException - on database error

See Also


$page methods and properties

API reference based on ProcessWire core version 3.0.251