method

NumberListField.DefaultFrom

Calculate the initial list on the server.

Arguments

ArgumentTypeDescription
callbackDefaultFunc[[]float64]A callback receiving operation.DefaultContext and returning operation.Value[[]float64] and an error.

Returns

The updated NumberListField; the original field is unchanged.

NumberListField

How it works

Return operation.Present(values) to supply the list or operation.Empty[[]float64]() to supply no default. A returned error stops the save.

This replaces a literal default. Returned items must satisfy normal item, count, and custom validation rules.

Full signature

Related types

  • NumberListField

    A configurable list of numbers.

  • DefaultFunc

    Choose a field’s initial value on the server using the request, user, locale, or nearby values.

Related guides