Christopher Dembek
03/08/2021, 11:54 AMSteve Goldberg
03/08/2021, 12:35 PMprototype.getFormValues
method?Christopher Dembek
03/08/2021, 12:58 PMChristopher Dembek
03/08/2021, 7:23 PMprototype.getFormValues
method, perhaps you can provide guidance?
This is my getFormValues… Hidden fields have a value set, however the data is not passed to the backend.
CustomApplicationFormView.prototype.getFormValues = function (form) {
var formValues = form.serializeObject();
return {
companyname: formValues.companyname,
address1: formValues.address1,
city: formValues.city,
state: formValues.state,
country: formValues.country,
zipcode: formValues.zipcode,
firstname: formValues.firstname,
lastname: formValues.lastname,
email: formValues.email,
phone: formValues.phone
};
};
Steve Goldberg
03/08/2021, 7:26 PMChristopher Dembek
03/08/2021, 7:26 PMImpossible to parse backend error - Request {"url":"<https://www.domain.com/scs/extensions/Inte>….0.0/services/CustomForm.Service.ss?c=1311312&n=2","type":"POST","isLocal":false,"global":true,"processData":false,"async":true,"contentType":"application/json","accepts":{"*":"*/*","text":"text/plain","html":"text/html","xml":"application/xml, text/xml","json":"application/json, text/javascript","script":"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},"contents":{"xml":{},"html":{},"json":{},"script":{}},"responseFields":{"xml":"responseXML","text":"responseText","json":"responseJSON"},"converters":{"text html":true},"flatOptions":{"url":true,"context":true},"jsonp":"callback","cache":true,"dataType":"json","data":"{\"country\":\"US\",\"companyname\":\"Company name\",\"address1\":\"Address 1\",\"city\":\"City\",\"state\":\"HI\",\"zipcode\":\"12345\",\"firstname\":\"First\",\"lastname\":\"First\",\"email\":\"<mailto:please.delete@email.com|please.delete@email.com>\",\"phone\":\"<tel:(555)555-5555|(555) 555-5555>\"}","validate":true,"parse":true,"wait":true,"emulateHTTP":false,"emulateJSON":false,"dataTypes":["text","json"],"crossDomain":false,"hasContent":true}
Uncaught TypeError: (intermediate value).showError is not a function
Steve Goldberg
03/08/2021, 7:27 PMthe data is not passed to the backendAs in, it is not being included in the JSON data that is being POSTed to the service file? Ie, the request object which you view in your Network tab does not show the hidden fields?
Christopher Dembek
03/08/2021, 7:30 PM{
country: "US",
companyname: "Please Delete",
address1: "adress 1",
city: "City",
state: "HI",
zipcode: "12345",
firstname: "First",
lastname: "Last",
email: "<mailto:please.delete@email.com|please.delete@email.com>",
phone: "<tel:(555)555-5555|(555) 555-5555>",
custentity_sc_store_is_online: "F",
custentity_sc_store_is_brick_mortar: "F",
subsidiary:1
}
Steve Goldberg
03/08/2021, 7:34 PMgetFormValues
Steve Goldberg
03/08/2021, 7:34 PMcustentity_sc_store_is_online
, custentity_sc_store_is_brick_mortar
, subsidiary
come from?Steve Goldberg
03/08/2021, 7:35 PMChristopher Dembek
03/08/2021, 7:35 PMcustentity_sc_store_is_online
, custentity_sc_store_is_brick_mortar
are both in the form as checkbox inputs and  subsidiary
is set in the service.Christopher Dembek
03/08/2021, 7:36 PM<input class="cust-form-input" name="custentity_cust_location" type="hidden" id="custentity_cust_location" value="13">
Steve Goldberg
03/08/2021, 7:37 PMChristopher Dembek
03/08/2021, 7:38 PMSteve Goldberg
03/08/2021, 7:38 PMSteve Goldberg
03/08/2021, 7:39 PMSteve Goldberg
03/08/2021, 7:39 PMChristopher Dembek
03/08/2021, 7:39 PM