Sets the value of a custom element in a Contract.



The ID of the Contract.


The name of the element.


The value of the element. Can take a single value or an array of values. For example, an array of values could be used to denote hours and minutes for a Time element.


For a single value:

FM_api('Contract_setCustom', [
	'id' => '1',
	'name'=> 'Lorem',
	'value' => 'Ipsum'

For an array of values:

FM_api('Contract_setCustom', [
	'id' => '1',
	'name'=> 'Time',
	'value' => ['4', '20']


On Success


On Failure

If the User is not logged in:

{'error':'not logged in'}

If the ID of the Contract is not given or is less than 1:

{'error':'invalid parameter: id'}

If the element name is not given:

{'error':'invalid parameter: name'}

If the element value is not given:

{'error':'invalid parameter: value'}

If the specified Contract does not exist:

{'error':'contract does not exist'}

Last updated