0

I have an issue when I order/add to card on one catalog service item . In fact, I am using a custom 'Catalog Client Script' on the onSubmit action to control if the customer added or not a attachment. Please find below my client script: client script

Script configuration: Script Configuration

The error when I order/add to card: Error order

I already targeted the cause, it's when I check the 'Applies on a Catalog Item view' (second image), but i need this to trigger the order and execute my script.

Do you know how to solve this?

Thank you.

GoA Oz
  • 328
  • 1
  • 13

1 Answers1

0

Solution: 'gel' is just a shortcut for " document.getElementById ", it's javascript function. But and unfortunately, to manipulate my form, i need to use GlideForm client-side API which provides methods for managing form. So I replaced:

var cat_id = gel('sysparm_item_guid').value;

by

var cat_id = g_form.getValue('sysparm_item_guid');

It works now.

GoA Oz
  • 328
  • 1
  • 13