Search
BaseForm Constructor
See Also
 






Initializes a new instance of the BaseForm class.

Namespace: MindFusion.Scheduling
File: BaseForm.js

 Syntax

JavaScript  Copy Code

function BaseForm (calendar, item)

 Parameters

calendar

Calendar. The calendar parent object of this form.

item

Item. The item instance associated with this form.

 Example

The following code extends BaseForm to create a custom form used for appointment entries. The custom form has a new constructor that takes three arguments and first calls the default constructor of the BaseForm class:

JavaScript  Copy Code

var p = MindFusion.Scheduling;

class CustomForm extends p.BaseForm {

 constructor(calendar, item, type) {
  super(calendar, item);
  this._id = "AppointmentForm";
  this._type = type;
  this.headerText = "New Appointment";

  this.colors = [{ value: 0, text: "white" }, { value: 1, text: "green" }, { value: 2, text: "red" }, { value: 3, text: "violet" }];
 }
…………..
}

 See Also