updateSituationWithFormValue

API / @publicodes/forms / updateSituationWithFormValue

function updateSituationWithFormValue<Name>(
   engine, 
   dottedName, 
   inputValue): void

Defined in: updateSituationWithFormValue.ts:17

Update the engine situation with the value of an associated form input element.

This function will update the engine situation with the value issued from a form element. It will convert the value to a publicodes expression that can be used to update the engine situation.

If the

Type Parameters

Type Parameter
Name extends string

Parameters

ParameterTypeDescription
engineEngine<Name>The engine to update
dottedNameNameThe name of the rule to update (or delete)
inputValueundefined | string | number | booleanis undefined, the rule will be deleted from the situation.

Returns

void