Published on : May 26, 2020
Sample Call
[do.@cmr]
[cmr-service.employment-info-controller.default_response_controller /]
[/do.@cmr]
Input
Key | Description | Sample Value |
@cmr.step_config.events.launch | Array of events to call at launch of screen | [flow category=”” action=”” label=”” /] [section category=”” action=”” label=”” /] [step category=”” action=”” label=”” /] |
@cmr.lapp.job_type | Job Type of the applicant | salaried / self-employed |
@cmr.lapp.official_email | Official email of applicant (Salaried) | |
@cmr.lapp.employer_name | Employer name of applicant (Salaried) | |
@cmr.lapp.employment_year | Employment Year of applicant (Salaried) | |
@cmr.lapp.home_addr_line1 | Address Line 1 of applicant’s current address (Salaried) | 104, Kalyani Nagar |
@cmr.lapp.home_addr_line2 | Address Line 2 of applicant’s current address (Salaried) | Pune |
@cmr.lapp.home_pincode | Selected pin code of the applicant’s residence (Salaried) | 411006 |
@cmr.lapp.total_work_experience | Total Work Experience (Salaried) | |
@cmr.lapp.business_name | Business name (Self Employed) | |
@cmr.lapp.years_of_business | Years of Business (Self Employed) | |
@cmr.lapp.business_addr_line1 | Business Address Line 1 (Self Employed) | |
@cmr.lapp.business_addr_line2 | Business Address Line 2 (Self Employed) | |
@cmr.lapp.business_pincode | Business Address Pincode (Self Employed) | |
@cmr.response_content.fields. current_address.label | Current Address label | Address Line 1 |
@cmr.response_content.fields. current_address.placeholder | Current Address Placeholder | Address Line 1 |
@cmr.response_content.fields. pincode.label | Current Address Pincode Label | Pincode |
@cmr.response_content.fields. pincode.placeholder | Current Address Pincode Placeholder | Pincode |
@cmr.response_content.title | Header – Title of the screen | Employer Information / Business Information |
@cmr.response_content.desc | Header – Description of the screen | We require the residence details for contactibility |
Output


Logic
- Create Events Array
- Fire Google Analytics Array
[cmr-service.events.ga_events data="{@cmr.events_data}" /]
- Fetch existing data from the @cmr.lapp
- Check Job Type
- Generate Form (Employer Details), in case of job_type = salaried
- Generate Form (Business Details), in case of job_type = self-employed
- Fetch Employment Year Options from Taxonomy
//** Fetch options **//
[query.get_terms taxonomies="{@cmr.response_content.fields.years_of_business.taxonomy}" hide_empty=0 parent="" o.set=template.options /]
- Add javascript function to validate form and change listeners
function validateForm(){
if( $('#current_address').val()=='' ||
$("input[name=official_email]").val()=='' ||
$("input[name=employer_name]").val() == '' ||
$("input[name=office_addr_line1]").val() == '' ||
$("input[name=office_pincode]").val() == '' ||
$("input[name=total_work_experience]").val() == '' ||
$("input[type=radio][name=employment_year]").is(':checked')===false
){
$(".continue-btn-emp-details").addClass("disabled");
} else{
$(".continue-btn-emp-details").removeClass("disabled");
}
}
$(' input[name=official_email], input[name=employer_name], input[name=office_addr_line1],input[name=office_addr_line2], input[name=office_pincode], input[name=employment_year], input[name=total_work_experience]').change(function(){
validateForm();
});