The Now Platform® Washington DC release is live. Watch now!
‎06-07-2019 07:15 AM
I hope you are ready for a weekend full of fun.
I have a catalog item for ordering a laptop. Users have to request a dell dock separately so I am combining both of them. Below is a screenprint for your reference. How can I display the total price of the order before form submission is done? I want to update the total calculated price field as the user changes the number of laptops and docks required. I tried it with an onChange catalog client script but it did not work. I am not familiar with widgets but looks like this is possible with them.
PS: I don't intend to modify the OOB pricing calculation.
Any input/help is much appreciated.
Solved! Go to Solution.
‎06-07-2019 08:14 AM
Hi Sagar,
Use below on chage code
function onChange(control, oldValue, newValue, isLoading) {
if (isLoading || newValue == '') {
return;
}
if (newValue == 1){
g_form.setValue('price','100');
}
if(newValue == 2){
g_form.setValue('price','200');
}
if(newValue == 3){
g_form.setValue('price','300');
}
//Type appropriate comment here, and begin script below
}
‎06-07-2019 08:14 AM
Hi Sagar,
Use below on chage code
function onChange(control, oldValue, newValue, isLoading) {
if (isLoading || newValue == '') {
return;
}
if (newValue == 1){
g_form.setValue('price','100');
}
if(newValue == 2){
g_form.setValue('price','200');
}
if(newValue == 3){
g_form.setValue('price','300');
}
//Type appropriate comment here, and begin script below
}