.
Create Custom Response with Google Apps 1
OBJECTIVE
1. Create script to send form response
Get the form from the previous tutorial.
1. Create script to send form response
function submitResponse(){
var form=FormApp.getActiveForm();
var items=form.getItems();
var itemName = items[0].asTextItem();
var itemNameResponse = itemName.createResponse('mr razoph');
var itemEmail = items[1].asTextItem();
var itemEmailResponse = itemEmail.createResponse('razoph@gmail.com');
var itemRefNo = items[2].asTextItem();
var itemRefNoResponse = itemRefNo.createResponse('razoph@gmail.com');
var formResponse = form.createResponse();
formResponse.withItemResponse(itemNameResponse );
formResponse.withItemResponse(itemEmailResponse );
formResponse.withItemResponse(itemRefNoResponse );
formResponse.submit();
}
|
Run.
Outcome.
REFERENCE
.
No comments:
Post a Comment