setFieldValue
brixxApi function to set a value to a field
Parameters
Example Usages
brixxApi.setFieldValue("myControlId", "Hello World!"); let myText = "Hello World!";
brixxApi.setFieldValue("myControlId", myText); brixxApi.setFieldValue("myDateControl", "2019-01-31"); //This is the format, you would get by getFieldValue
brixxApi.setFieldValue("myDateControl", new Date()); //This will set todays date.
brixxApi.setFieldValue("myDateControl", new moment().add(1, "month")); // you can use moment to set calculated dates. See https://momentjs.com/ for more details and examples brixxApi.setFieldValue("myCalendarControl", "2019-01-31"); //resources will delete all and set a new array of resources
brixxApi.setFieldValue("myCalendarControl.resources", [
{
id: 1,
title: "Room A",
},
{
id: 1,
title: "Room B",
}]);
//resource will add a single resource
brixxApi.setFieldValue("myCalendarControl.resource", {
id: 1,
title: "Room A",
});Demo
Last updated