# Remote Function

Remote function allow you to set the initialization the data to component witch need data to show, such as single check box, multiple check box, drop down select box.

  1. Set the name of remote function, Value:Defines the value of the options sent to the server, label:Defines the describe of the value.

2.Set the property to remote in fm-generate-form , it will load remote data via the remote function.

remoteFuncs: {
  func_test (resolve) {
    // mock data,you can write you own code to 	//get the data 
    setTimeout(() => {
      const options = [
        {value: 'value1', label: 'label1'},
        {value: 'value1', label: 'label1'},
        {value: 'value1', label: 'label1'},
      //This method will parse the data and bind to the component.
    }, 2000)

You need to invoke the callback method to bind the remote data to the component.

  1. Preview View