function onChange(control, oldValue, newValue, isLoading) { if (isLoading || newValue == '') { return; } g_form.clearOptions('category_sub_process'); if (newValue == '1') { g_form.addOption('category_sub_process', 'fb60', 'FB60'); g_form.addOption('category_sub_process', 'write_off', 'Write off'); g_form.addOption('category_sub_process', 'recurrent', 'Recurrent'); g_form.addOption('category_sub_process', 'payment_request_form', 'Payment Request form'); g_form.addOption('category_sub_process', 'workflow_changes', 'Workflow changes'); g_form.addOption('category_sub_process', 'offset', 'Offset'); g_form.addOption('category_sub_process', 'invoices_credit_posting', 'Invoices/credit posting'); g_form.addOption('category_sub_process', 'deletion_request', 'Deletion request'); g_form.removeOption('category_sub_process', 'urgent_posting'); g_form.removeOption('category_sub_process', 'payment_changes'); g_form.removeOption('category_sub_process', 'payment_issues'); g_form.removeOption('category_sub_process', 'other_inquiries'); g_form.removeOption('category_sub_process', 'other_request'); } else if (newValue == '2') { g_form.removeOption('category_sub_process', 'fb60', 'FB60'); g_form.removeOption('category_sub_process', 'write_off', 'Write off'); g_form.removeOption('category_sub_process', 'recurrent', 'Recurrent'); g_form.removeOption('category_sub_process', 'payment_request_form', 'Payment Request form'); g_form.removeOption('category_sub_process', 'workflow_changes', 'Workflow changes'); g_form.removeOption('category_sub_process', 'offset', 'Offset'); g_form.removeOption('category_sub_process', 'invoices_credit_posting', 'Invoices/credit posting'); g_form.removeOption('category_sub_process', 'deletion_request', 'Deletion request'); g_form.addOption('category_sub_process', 'urgent_posting','Urgent Posting'); g_form.removeOption('category_sub_process', 'payment_changes','Payment changes'); g_form.removeOption('category_sub_process', 'payment_issues','Payment issues'); g_form.removeOption('category_sub_process', 'other_inquiries','Other Inquiries'); g_form.removeOption('category_sub_process', 'other_request','Other request'); }
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter