Clear menu sidebar after input

6 views
Skip to first unread message

Kay Siebke

unread,
Jul 1, 2024, 4:58:22 AM (2 days ago) Jul 1
to Google Ads Scripts Forum
Good day, I have a menu sidebar with input fields in Google Sheets. Unfortunately, I have a problem that the input fields do not reset after entering with the button. Can someone help me because I am a complete beginner?Bildschirmfoto vom 2024-06-30 09-49-55.png

<!DOCTYPE html>
<html>
<head>
<base target="_top">
<style>
body {
;
font-family: Arial, sans-serif;
padding: 20px;

}
label {
font-weight: bold;
text-transform: uppercase;
}
input[type="text"] {
width: 100%;
padding: 8px;
margin-bottom: 10px;
border: 2px outset #FF0000;
border-radius: 5px;
box-sizing: border-box;
}
input[type="button"] {
background-color: #ff1900;
color: white;
padding: 10px 100px;
border: 8px bold;
border-radius: 8px;
cursor: pointer;
}
input[type="button"]:hover {
background-color: #8fce00;
}
</style>
</head>
<body>
<form id="itemForm">
<label for="sku">SKU:</label><br>
<input type="text" id="sku" name="sku"><br>
<label for="color">Color:</label><br>
<input type="text" id="color" name="color"><br>
<label for="size">Size:</label><br>
<input type="text" id="size" name="size"><br>
<label for="description">Description:</label><br>
<input type="text" id="description" name="description"><br><br>
<input type="button" value="Submit" onclick="submitForm()"><br><br>
<span class="cancel" onclick="google.script.host.close()">Cancel</span>
</form>
<script>
function submitForm() {
var form = document.getElementById('itemForm');
var formData = {
'sku': form.sku.value,
'color': form.color.value,
'size': form.size.value,
'description': form.description.value
};
google.script.run.processForm(formData);
inputs.forEach(input => input.value = '');

}
</script>
</body>
</html>

Google Ads Scripts Forum Advisor

unread,
Jul 1, 2024, 9:56:16 AM (2 days ago) Jul 1
to adwords...@googlegroups.com
Hi,

Thank you for reaching out to the Google Ads Scripts team. 

Kindly note that Google sheets related issues are out of scope for the Google Ads Scripts team. I would recommend that you reach out to the Google Docs Editor support team as they are better equipped to address your concerns.

Please note that our team can only provide assistance with technical issues or concerns related to the Google Ads Scripts
 
This message is in relation to case "ref:!00D1U01174p.!5004Q02tJWZ6:ref" (ADR-00244669)

Thanks,
 
Google Logo Google Ads Scripts Team


Reply all
Reply to author
Forward
0 new messages