I'd like to replace a parts requisition process at my workplace with a simple (and cheap to implement) electronic process, initiated using a Google Form. The problem is that I would like users to be able to enter multiple parts (along with associated info, e.g. quantities required, booking references etc.), but I want to do so without having to have multiple repeated questions.
I have researched this extensively and cannot find anything which fits the bill - my thoughts are to use Google Apps Script to create a table in the form which a user can fill-in. The closest I have found is something like this: Creating Form Elements Dynamically
The original paper form looks like the below - I would like the table to request the information as shown below in a similar format:
Thanks in advance!
EDIT! To make it clear, I'm happy to consider other solutions to run this process through an online interface - I have gone for Google Sheets/Forms in the first instance as they are already well integrated within my pany and I have experience of them (setting-up triggers etc is pretty simple)
I'd like to replace a parts requisition process at my workplace with a simple (and cheap to implement) electronic process, initiated using a Google Form. The problem is that I would like users to be able to enter multiple parts (along with associated info, e.g. quantities required, booking references etc.), but I want to do so without having to have multiple repeated questions.
I have researched this extensively and cannot find anything which fits the bill - my thoughts are to use Google Apps Script to create a table in the form which a user can fill-in. The closest I have found is something like this: Creating Form Elements Dynamically
The original paper form looks like the below - I would like the table to request the information as shown below in a similar format:
Thanks in advance!
EDIT! To make it clear, I'm happy to consider other solutions to run this process through an online interface - I have gone for Google Sheets/Forms in the first instance as they are already well integrated within my pany and I have experience of them (setting-up triggers etc is pretty simple)
Share Improve this question edited Nov 3, 2014 at 12:59 MikeyB asked Nov 3, 2014 at 12:02 MikeyBMikeyB 3011 gold badge2 silver badges12 bronze badges 2- @vimes1984 Please elaborate what you want to do with the data. Say someone fills in the spreadsheet above, what should happen to the data? should it be submitted somewhere? emailed? stored in an database? etc... Do parts numbers need to auto fill data of stocks? are stocks kept somewhere? what data fields do you need? Part number, qty, booking ref and notes only? Also, it would have helped if you had posted your own question. – Tschallacka Commented Feb 17, 2020 at 14:51
- 1 IHMO this question should be closed because is likely to lead to opinion-based answers. – Wicket Commented Feb 20, 2020 at 23:59
1 Answer
Reset to default 2 +100I understand the OP has probably long moved on from this problem. I however have done something along these lines in the past and thought I'd share my approach with the munity.
I'll start with the premise Google forms are just good ol' plain HTML forms that users programmatically generate with their form builder. Therefore it's possible to traverse the as-built form and extract both submit location and all field names:
document.querySelectorAll('form').forEach((x) => {console.log(x.action)})```
document.querySelectorAll('[name^="entry."]').forEach((x) => {console.log(x.name + '=' + x.closest('[role="listitem"]').querySelector('[role="heading"]').innerText)})
The above snippet will give you an idea of what the ponents are.
All that's left after is to build a front end to your requirements with the framework of your choice (I used AngularJs at the peak of its popularity) and incorporate as much or as little UI and validations into it as you desire.
Here you've got the flexibility to either submit the whole thing as one JSON, or to parse it into individual fields and submit entries one by one, for purposes of this demo I opted for the easiest way but this thing surely's got the potential.