# Scripting a simple trigger

**URL:** <https://community.glideapps.com/t/scripting-a-simple-trigger/49656>\
**Category:** Ask for Help\
**Created:** [September 19, 2022, 10:46pm UTC](https://community.glideapps.com/t/scripting-a-simple-trigger/49656 "2022-09-19T22:46:45Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![John\_Clements](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/john_clements/32/48041_2.png) [@John\_Clements](https://community.glideapps.com/u/John_Clements)\
**Post date:** [September 19, 2022, 10:46pm UTC](https://community.glideapps.com/t/scripting-a-simple-trigger/49656/1 "2022-09-19T22:46:45Z")

</div>

I am trying to create a simple trigger that when I change a cell “Teacher Name” , it clears the form so I can enter new Information for another teacher. Then when I have completed the form, I want to enter a new teacher’s name, which triggers cells to clear, and so on.

I try this, but it keeps showing an error ('source" not defined)

Any Thoughts?

---

<div class="post-metadata">

**Author:** ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)\
**Post date:** [September 20, 2022, 1:16am UTC](https://community.glideapps.com/t/scripting-a-simple-trigger/49656/2 "2022-09-20T01:16:09Z")

</div>

Shouldn’t you do it with a form inside Glide instead of relying on a Sheets trigger? You can submit teachers’ info as separate form submissions.

---

<div class="post-metadata">

**Author:** ![John\_Clements](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/john_clements/32/48041_2.png) [@John\_Clements](https://community.glideapps.com/u/John_Clements)\
**Post date:** [September 20, 2022, 1:11pm UTC](https://community.glideapps.com/t/scripting-a-simple-trigger/49656/3 "2022-09-20T13:11:40Z")

</div>

The issue is that I need to clear the form on my iPad. I have the code to clear it on my PC. The Ipad does not recognize the script and will not clear the form.

---

<div class="post-metadata">

**Author:** ![Darren\_Murphy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/darren_murphy/32/47326_2.png) [@Darren\_Murphy](https://community.glideapps.com/u/Darren_Murphy)\
**Post date:** [September 20, 2022, 1:30pm UTC](https://community.glideapps.com/t/scripting-a-simple-trigger/49656/4 "2022-09-20T13:30:53Z")

</div>

I agree with @ThinhDinh, you shouldn’t be using scripts for this. Glide gives you all the tools you need to manage data collection via forms.

Perhaps if you can share some more details about how you currently have this setup in Glide (ignoring the Google Sheets), we might be able to guide you to a better way to get what you need.
