我有一个通过应用脚本连接到Google表格的表单。用户填写完表格后,就必须在线付款以完成注册。但是有些用户填写表格后不付款。仅当用户付款时,有什么方法可以获取表格条目吗?
我在脚本中收到表单提交之前尝试添加付款链接,但是没有用
<script type="text/javascript">
var script_url = "https://script.google.com/macros/s/AKfycbwxw9ih26z2B5eS_68qfR6CRmQUgZRnNXedW5CjpCS5IwukkWg/exec";
function insert_value() {
var id = $("#id").val();
var full_name = $("#full_name").val();
var studying_class = $("#studying_class").val();
var school_name = $("#school_name").val();
var contact_no = $("#contact_no").val();
var e_mail_address = $("#e_mail_address").val();
var gender = $("#gender").val();
var dob = $("#dob").val();
var url = script_url + "?callback=ctrlq&full_name=" + full_name + "&id=" + id + "&contact_no=" + contact_no + "&studying_class=" + studying_class + "&school_name=" + school_name + "&e_mail_address=" + e_mail_address + "&gender=" + gender + "&dob=" + dob + "&action=insert";
var request = jQuery.ajax({
crossDomain: true,url: url,method: "GET",dataType: "jsonp"
});
$("#registration-form")[0].reset();
// var message = 'We will contact you through your contact no provided.';
// $('#alertModal').find('.modal-body p').text(message);
// $('#alertModal').modal('show')
// https://paytm.business/link/1570965263162/LL_16421645
window.location.href = "https://paytm.business/link/1570965263162/LL_16421645";
}
function ctrlq(e) {
alert("Successfully Registered")
}
</script>
仅当用户在线付款时,才应通过应用脚本在Google表格中获取表单条目。