AnsweredAssumed Answered

Change requestedFor field from custom form

Question asked by Aleksandar_Stancic on Jun 5, 2015

I'm trying to change the requestedFor field of the Service Catalog request based on the value of the field that user can select on custom made form.

My idea was to do it on the onSubmit event of the form using JS function.

 

here is the example of the function with the fixed value of the user that I want to set as requestedFor

 

{
   x : function() {
try{

_.request.requestedFor='username';

alert(_.request.requestedFor);
return true;
}
catch(err) {
    alert(err.message);
}   }
}

 

alert returns the correct user name but when I add the offering to cart and go to the cart screen the requestedFor field is still set to the requestor.

 

how can I submit the change I have made to the request object on my form?

Outcomes