$page->saveFields() method

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.244

“Indeed, if ProcessWire can be considered as a CMS in its own right, it also offers all the advantages of a CMF (Content Management Framework). Unlike other solutions, the programmer is not forced to follow the proposed model and can integrate his/her ways of doing things.” —Guy Verville, Spiria Digital Inc.