Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Replaced 'cbx' prefixed events with Canvas Constants.

...

Form ID

Item ID

Form Item

Display Name Key

Category: Adding the multi-form and Sub Form on the main formĀ 

BILLER_INFO

BILLER_LABELS

FORM


BILLER_INFO

BILLER_DETAILS

FORM


Category: Adding the items in the Sub Form

BILLER_LABELS

BILLER_NAME

LABEL

BILLER_ NAME

BILLER_LABELS

BILLER_AMOUNT

LABEL

BILLER_ AMOUNT

BILLER_LABELS

AREA_CODE

LABEL

AREA_C ODE

Category: Adding the items on the Multi-FormĀ 

BILLER_DETAILS

BILLER_COMPOSIT

FORM COMPOSIT


BILLER_DETAILS

OPT_BILLER

RADIO GROUP


BILLER_DETAILS

TXT_BILLER_NAME

TEXT


BILLER_DETAILS

TXT_BILLER_AMT

AMOUNT


BILLER_DETAILS

CMB_AREA_CODE

COMBO


...

To delete an instance of the form, use the fm.removeAt(formIndex,'FORM_ID'); API as shown:

Code Block
languagejs
cbxcanvas.ns("my.listner.namespace"); my.listner.namespace.BillerInfoForm = Class(cbxcanvas.Observable,
 { 
	constructor : function (config)
	{ 
		this.fm = config.fm;
	}, 
	registerHandlers : function ()
	{
		var formIndex=null; 
		this.fm.registerHandler("cbxchange"CFEC.CHANGE,"OPT_BILLER", function(fm, event, fieldname, value, index, parent) 
		{ 
			//finding the index of the instance to be deleted formIndex=index; 
			var count = fm.getNumberOfSubForms('BILLER_DETAILS'); for(var i=0; i<count; i++) 
			{
				if(i!=index)
				{ 
					fm.model.setValue('OPT_BILLER',"",false,i,parent);
				}
			} 
		});
	}
}); 

CFLR.registerListener("BILLER_INFO", my.listner.namespace.BillerInfoForm); 

CABR.registerHandler('BTN_ADD','CONT_BILLER_INFO', function (config)
{
	fm.removeAt(formIndex, 'FORM_BBAR_MULTI'); 
}); 

...