Allocate Funds
This component is used to take input from users during the funding flow of the Onboarding process.
The text boxes in the component contain auto format feature. This feature enables formatting of the currency that is entered, based on the locale.
Following are the various views of the Allocate funds component:
- Desktop & tablet view : 640 < width
- Mobile view : width <= 640
Usage
Here are the steps to set the component in Quantum Visualizer:
- Open the Temenos DigitalOrigination project in Quantum Visualizer.
- Drag and drop a Flex Container widget onto the required form.
- Select the Flex Container and set height as Preferred.
- Insert the component in the Flex Container.
Ensure that you import FormatAmount.js module into the project. This module contains the call functions for the Auto format feature of text boxes.
APIs

Sets data to the component.
Parameters:
data (Array of objects) - mandatory
Each object corresponds to a row in the component.
Example:
//sample data, renders the 2nd and 3rd row in the desktop image var data = [{ "imgProduct": "savingsaccounts.png", "lblCurrency": "$", "lblProductTitle": "Advanced Savings Account", "tbxAmount": { text: "", placeholder: "Enter Amount" } }, { "imgProduct": "cd.png", "lblAPY": "APY", "lblAPYValue": "1.50%", "lblCDTitle": "Standard Term Certificate of Deposit", "lblCurrency": "$", "lblDepositAmount": "Deposit Amount", "lblDepositAmountValue": "$ 10,000 - 20,000", "lblDepositTerm": "Deposit Term", "lblDepositTermValue": "3 Years", "lblInterestRate": "Interest Rate", "lblInterestRateValue": "0.20%", "tbxAmount": { text: "", placeholder: "Enter Amount" }, }]; this.view.allocateFunds.setData(data);

Hides error message of the component.
Example:
this.view.allocateFunds.hideError();

Displays error message above the component.
Parameters:
errMsg (String) - mandatory
It is the message to be displayed above the component.
Example:
this.view.allocateFunds.showError("Please enter amount within Deposit Amount range");

Returns data of the component.
Example:
var data = this.view.allocateFunds.getData();
Callbacks

This function is called on the onDone and the onEndEditing events of any textbox in the component.
Parameters:
data (Array of objects)
Data of the component is passed as a argument to the function.
Example:
var textboxCallback = function (data){ kony.print(data); } this.view.allocateFunds.formCallback = textboxCallback;
In this topic