Google Sheets - Userform

Поделиться
HTML-код
  • Опубликовано: 22 авг 2024
  • Learn how to create a user form in Google Sheets using Apps Script and Materialize CSS. In this tutorial we'll add UI elements like Sidebar & Dialog Boxes with a userform to our spreadsheet and pass information from our user interface to our worksheet.
    For more advanced user form check out Userform Level 2 Series:
    • Google Sheets Userform...

Комментарии • 270

  • @rezamirrahizar2523
    @rezamirrahizar2523 3 года назад +4

    Thank you for such a great tutorial. Just wanted to share if anyone is having trouble with the "google.script.run" not executing, it might have something to do with multiple accounts signed into Google (at least that was the case for me). So try signing out of the other accounts and it will work

    • @billmical8008
      @billmical8008 3 года назад +1

      Just spend the last two days dumbfounded on why my code was not working. Thank you so much for your comment!!!

    • @rafaom
      @rafaom 2 года назад +1

      Thanks, thanks a lot!!!!

  • @teacherwisleykid2088
    @teacherwisleykid2088 3 года назад +2

    You're such a good teacher! All the explanations are very clear! Thank you for this content.

  • @tomatina21
    @tomatina21 5 лет назад +21

    Thanks for another great tutorial!! How can you create an edit button to edit/update/delete a previous form entry ? Could you make a tutorial on this?

  • @lpanebr
    @lpanebr 5 лет назад +5

    I watched your web app serie. Showing the HTML inside like this is also very nice! One thing I did differently was that I used HTML5 validation. Thank you!

  • @immanuelsuleiman7550
    @immanuelsuleiman7550 4 года назад +2

    I wasn't looking for this whatsoever but I'm glad that I found it
    Thank you so much you are an awesome person

  • @LAQUABI
    @LAQUABI 5 лет назад +2

    Thank you very much for this video. I did not know we could do this inside Google Sheets until now. If possible, could you please do more videos about Google Sheets using Apps Script and Materialize CSS like this one? There are so many other useful things I saw on Materialize CSS and it would be so much easier to understand with your explanations. You're really good at teaching! I'm looking forward to seeing more of your tutorials.

  • @andrezein
    @andrezein 3 года назад +2

    You are a wonderful teacher! Loved it, and subscribed, as I am seriously getting hooked to this type of development.

  • @Prince_Chaurasia
    @Prince_Chaurasia 4 года назад +1

    Thank-you so much for great tutorial
    Please make part 2 with following thing
    1. Spreadsheet will come in read-only mode when cancel user form
    2. Spreadsheet will close when cancel user form
    3.Entry should be done only ten digit phone no in phone section

  • @santosahernandezmendoza7147
    @santosahernandezmendoza7147 2 года назад

    With some modifications I managed to create more fields to add to my spreadsheet. Thank you, your tutorials are extraordinary. ☑

  • @tamjinhongmonkeystudio6120
    @tamjinhongmonkeystudio6120 4 года назад +3

    Great tutorial!! i followed all the step shown in the tutorial. But the data in the form din't update in my sheet. i can't figured out why. i have go through all the spelling and brackets but still fail to update the data on my sheet. Please help

  • @Ahmedabushaban8
    @Ahmedabushaban8 4 года назад

    I used this at my work and managed to significantly expand it. I also managed to insert formulas into a cell from gs
    Thank you so much!!

    • @ThangHoang-ns6mq
      @ThangHoang-ns6mq 3 года назад

      @VNP SHEQ Consulting have you solved it? I have the same error :(

  • @shyammourya8317
    @shyammourya8317 3 года назад +1

    Thanks for this great and useful tutorial. This video is really useful to me.

  • @mehdibellatig8776
    @mehdibellatig8776 5 лет назад +3

    This is incredible ! Thank you sooo much for sharing all this!

  • @jennylenesmith-drayton8677
    @jennylenesmith-drayton8677 4 года назад

    Very good video explaining the use of macros. I like the use of multiple examples to demonstrate

  • @wirot125
    @wirot125 4 года назад

    Merry Christmast and A Happy New Year.
    Thank you very much for your worthly lessons.
    They give me the big inspiration!

  • @jorgemendoza1160
    @jorgemendoza1160 5 лет назад

    This is completely usefull! If you have an online class in Udemy or in another website, let me know 🙌

  • @sofees
    @sofees Год назад

    you are actually awesome

  • @SinghSumi01
    @SinghSumi01 4 года назад +3

    This is not working for me. I write the script exactly according to your video, but the data from the form does not load the sheet. Please help.

  • @AlbanoLaTorella
    @AlbanoLaTorella 4 года назад +1

    fantastic guide, I'm a beginner, is it easy to use the same form to read and modify the data entered? if yes who can tell me how

  • @downhillindad7689
    @downhillindad7689 3 года назад +1

    This is a fantastic tutorial! Thank you for taking the time to do this. However, I am struggling with getting the button to do anything. Am I the only one who can't get the submit button to work? I have paired it down all the way to simply getting a message box to pop up indicating that I'm in the function that the button activates, but it's simply dead. It's not going into the function. No errors, just nothing happens. Any help would be great

  • @mousaji
    @mousaji 5 лет назад

    Intresting thing executed in simple way. Hats off buddy..

  • @arnavrajiv4070
    @arnavrajiv4070 3 года назад +2

    I've been following along the video and "google.script.run.appendData(data);" doesn't work, I have faced a similar problem in another tutorial as well! Please help

    • @stocker6315
      @stocker6315 3 года назад

      Same here. Have you figured it out yet?

  • @indoremechanics
    @indoremechanics 4 года назад +1

    TypeError: Cannot read property 'name' of undefined (line 48, file "Menus")Dismiss
    what can i doo

  • @matthewdevenecia7898
    @matthewdevenecia7898 3 года назад +1

    Thanks! This helps a lot!

  • @hafizarman3784
    @hafizarman3784 5 лет назад

    Very fantastic video
    Please explain us about duplicate value
    How to stop duplicate value via userform in google sheets

  • @watsonpinkaew3069
    @watsonpinkaew3069 5 лет назад

    Hi, thanks a lot. Your clip is very easy to follow step by step. It's great! Thumbs up.

  • @renzonicolini7062
    @renzonicolini7062 5 лет назад +1

    Hello my friend, I have a web site and i need to put a form inside the web site y colect all data from clients in google sheets. How can I do that?

  • @DominikBarchanski
    @DominikBarchanski 4 года назад +1

    i have a bit problem with this when i want to execute function google.script.run.function(); it don't do any things what should i do

  • @MsBoolo
    @MsBoolo 2 года назад

    Awesome 👌. Great tutorials 👍

  • @deFunkyMofo
    @deFunkyMofo 4 года назад

    Excellent work young man ...

  • @davidps
    @davidps 4 года назад +1

    so cool

  • @Sachin-sw6om
    @Sachin-sw6om Год назад

    Hello, I have a add on installed in google sheet (when I fill the data in google sheet it triggers a data to add on app) . The problem is when I get the data in google sheet from google forms, it is not triggering data to add on . Pls give me solution. I have tried the spreadsheet.flush option, it’s not working

  • @axies-learningthatmatters5387
    @axies-learningthatmatters5387 3 года назад

    I have an existing problem. How to apply onOpen(e) here. And is it possible that the modal will not be closed?

  • @evannerosedaganio8708
    @evannerosedaganio8708 2 года назад

    help i need a function that popup the userform when its reload that i dont need to run it over the Tools/Script

  • @AntonioSantos-ve6zv
    @AntonioSantos-ve6zv 3 года назад

    Awesome content! Thanks a lot!

  • @burhansrengat
    @burhansrengat 3 года назад +1

    Thank you !!

  • @orzel7690
    @orzel7690 5 лет назад +1

    Is a way to read data to this userform, than edit and add again to sheet ?

  • @orlandsalas7346
    @orlandsalas7346 4 года назад

    Awesome Tutorial

  • @Syzyf37
    @Syzyf37 5 лет назад +1

    I have a question. How do you save "name" and "phone" data in a spreadsheet in any selected columns, for example in columns C and E?

  • @apolovzla_ccs
    @apolovzla_ccs 5 лет назад

    as always, great video dude... thank you

  • @materialuoat7860
    @materialuoat7860 4 года назад +3

    Hi, i'm amazed with the thing you doing with these videos, thanks for every video you upload!. With this i have a problem in "google.script.run." never run in the way you show, but i look over there in forums, and nothing, until i decide delete of minified JavaScript code, and they works, but of course, the animation of button an text stops, so i decided to put again but after the script you write, and works perfectly, i decided put here if anyone else have the same problem.
    i ask you to make some video with explanation of Class Blob in Apps Script, and if its possible wok with that ina "showSidebar(html)", i try to read in other foums an in the same google documentation, but nothing, and you way of explain its very useful to absolute beginers, like me. Thanks again

    • @sabrananda
      @sabrananda 3 года назад

      i delete minified javascript but still not work,, anyone with same problem? i use G-Suite for education account, is that an issue?

    • @sabrananda
      @sabrananda 3 года назад

      i try again with my regular @gmail.com account, it's work!
      anyone can do this on G-Suite For Education account? cause my company use G-Suite for education to work in shared drive

  • @asia22
    @asia22 4 года назад +1

    Litty, thank you so much 🔥🔥🔥🔥🔥

  • @pichit.raetai
    @pichit.raetai 5 лет назад

    thank you very much. i see ur all video

  • @geniewu390
    @geniewu390 5 лет назад

    The video is so helpful! Have you thought about doing a tutorial on combing google form instead of creating your own form?

    • @ExcelGoogleSheets
      @ExcelGoogleSheets  5 лет назад

      I do have Google Forms videos. Web App is much more flexible but you should use whatever works for you.

  • @shabnamnaseemahmed.5072
    @shabnamnaseemahmed.5072 4 года назад

    I have the following error while running the script.
    Exception: Cannot call SpreadsheetApp.getUi() from this context. (line 5, file "Code")Dismiss

  • @IntrepidFox
    @IntrepidFox 4 года назад

    Many thanks for this!

    • @ExcelGoogleSheets
      @ExcelGoogleSheets  4 года назад

      Glad you like it. Check out the new level 2 series ruclips.net/p/PLv9Pf9aNgemuzTNWeHd8HziGVNzSlWACh

  • @opsocs7401
    @opsocs7401 4 года назад +1

    Help! I copied his script character by character and it still won't work! There will be a sidebar, but once I hit "Add", nothing happens! Can anyone help a brother out?

    • @Grace-fd8qp
      @Grace-fd8qp 4 года назад

      the same situation to me please help :))

    • @kostnuzula2833
      @kostnuzula2833 4 года назад

      just look at the very bottom, my input is put on bottom, because it already have content

  • @ryanbrasher5684
    @ryanbrasher5684 4 года назад

    Also, excellent video, and thank you so much.

  • @sheyanran508
    @sheyanran508 4 года назад

    I followed everything, however, it does not work. The data I am inputting was not added.

  • @racheldelgado5541
    @racheldelgado5541 4 года назад

    Thank you so much... I learned a lot :)

  • @Zawodowieec
    @Zawodowieec 4 года назад

    Great tutorial, thank you pal ;)

  • @pankajjoshi8292
    @pankajjoshi8292 4 года назад

    Can i implement them in Google sheet ? Can you pls tell how to create Login id Password form , using Google sheet which i can use google sheet. thaking you lots

  • @somethingiswrong6362
    @somethingiswrong6362 3 года назад +1

    Awesome

  • @sioetan9492
    @sioetan9492 4 года назад

    Thanks for another great tutorial , please help me...
    how to create a new name in a particular table, for example in the H section?...... thanks for the answer

  • @julia.vasilieva
    @julia.vasilieva 5 лет назад

    Thanks! Great tutorial!! I have a question: how to align a button in the center?

  • @trijayagroup7857
    @trijayagroup7857 4 года назад

    hello, thank you for the video, very nice explanation and helpful....
    what about if i want to validate some things, like if the userform input any same telephone number, then the msg box will pop up and shows that "duplicate phone number"?

  • @altamis4410
    @altamis4410 3 года назад

    yes very nice, but i think it would be nice to add the log data into another spreadsheet, not the current one, anyways is someone have the sheet link will face with the userform too ?

  • @vegasilkit
    @vegasilkit 3 года назад

    How could you do an edit form which would display data from the row that you click in? Certain parts of the data would not be editable i.e. the persons iD number and name. Have you already addressed this somewhere? This was a great video!

  • @MrYoubetube22
    @MrYoubetube22 5 лет назад

    Hello,
    I try to copy the complete script and does't work.
    when I full feel with name and phone after I click the name and phone number are not save i the sheets.
    tell please what I shut do?

  • @dr.bhavinmodi6935
    @dr.bhavinmodi6935 4 года назад

    Very nice!
    Got to learn something new.
    My Question: How can I creat patient records sheet?

  • @singhalmonica
    @singhalmonica 3 года назад

    Thanks sir, pls help to prevent editing in entered data

  • @ilayarajaramasamy1263
    @ilayarajaramasamy1263 5 лет назад +1

    Will it work on android phone also?

  • @nikluz3807
    @nikluz3807 3 года назад

    is there a way to pass data from the google sheet into the html form?

  • @edwinalfonsomonteromontero5843
    @edwinalfonsomonteromontero5843 5 лет назад

    Hola puedes hacer un ejemplo donde se consulte un spreadsheets por medio del form, es decir, dado un identificador buscar y mostrar el nombre asociado al identificador almacenado en una tabla en sheets. Gracias y muy buen vídeo.

  • @dewaynewest7756
    @dewaynewest7756 5 лет назад

    Can we add multiple checkboxes and get the value of each checked box???

  • @AshleyCreighton
    @AshleyCreighton 4 года назад +1

    Watched this three times and copied it *to the absolute letter*; still can't get the form to add records to the worksheet 🤔

    • @cgadistribuicao9420
      @cgadistribuicao9420 4 года назад

      So do I

    • @AshleyCreighton
      @AshleyCreighton 4 года назад

      FWIW, I forgot to capitalize something in the javascript 🙃 Joined the channel's Patreon and got some help directly from the mastermind himself. Happy to support his excellent work here. 👏👏👏

    • @SuperIdeas_org
      @SuperIdeas_org 4 года назад

      Be sure to open the script editor from inside the spreadsheet: prnt.sc/r4jlwv

  • @mictralif7515
    @mictralif7515 4 года назад

    this adds on the next blank rows... some parts of my rows has formulas.. how do i enter data on blank cells on a row

  • @GustavoMOrralaPonce
    @GustavoMOrralaPonce 4 года назад +1

    Excelente

  • @perepausancho
    @perepausancho Год назад

    ¡Gracias!

  • @LASONORALIMITE
    @LASONORALIMITE 4 года назад

    how login app to google sites with google apps script. please help me . thanks. sorrry for my english. i speak spanish

  • @Talas99
    @Talas99 3 года назад

    what about uploading files ? how to deal with that

  • @ynneky
    @ynneky 4 года назад +1

    Thanks for the video! How can I create a dropdown list within the input box?

    • @ExcelGoogleSheets
      @ExcelGoogleSheets  4 года назад +1

      Please watch my web app series.

    • @ynneky
      @ynneky 4 года назад +1

      @@ExcelGoogleSheets Thanks alot! I have managed to create it! Btw, how do I create a button to clear all the input fields?

  • @LoneSMyrup
    @LoneSMyrup 3 года назад

    Hi :-) Somehow buttons never work for me in forms. I have tried several tutorials including this and have verified that everyting is exactly the same - but iIeither get nothing og TypeError: Cannot read property 'name' of undefined. Please help me - what am I doing wrong?

    • @ExcelGoogleSheets
      @ExcelGoogleSheets  3 года назад +1

      One thing a lot of people miss is that JavaScript is case sensitive. So everything you do, make sure you match cases.

  • @66Komodo
    @66Komodo 5 лет назад

    very useful videos.

  • @nickieoakwood6926
    @nickieoakwood6926 4 года назад

    I suppose I should just give up at 01:30. What is puzzling me is the different names for like name, tel no. It would be a lot easier if you kept these uniform or gave a clearer explanation. I have followed to the T but just called SALES ORDER NO and PRODUCTS but the form won't populate the sheet. Most of the way there!

  • @mictralif7515
    @mictralif7515 4 года назад

    @Learn Google Spreadsheets HI! thank you for helping those who wants to learn.
    if the form was close how can you re-open it? can there be a shortcut on the sheet? or is there a way so that use can not close the form? or can the form show up when i open the form?

    • @ExcelGoogleSheets
      @ExcelGoogleSheets  4 года назад +1

      ruclips.net/video/_Iq2-_WgFdY/видео.html

    • @mictralif7515
      @mictralif7515 4 года назад

      @@ExcelGoogleSheets thank you very much sir!

  • @lecaonguyen79
    @lecaonguyen79 5 лет назад

    Thank You!

  • @proferodiana
    @proferodiana 5 лет назад

    Wow ! Thanks !

  • @crazyworld7485
    @crazyworld7485 4 года назад

    Great tutorial but when i try on mobile such Chrome or Google sheet app the script not working. Please help how to script work on mobile.

  • @christopherb.223
    @christopherb.223 4 года назад

    ¡Amazing Work!

    • @ExcelGoogleSheets
      @ExcelGoogleSheets  4 года назад

      Thanks a lot! Check out the new series ruclips.net/p/PLv9Pf9aNgemuzTNWeHd8HziGVNzSlWACh

  • @roro8910
    @roro8910 3 года назад

    Hi! I followed your steps but this statement google.script.run.appendData(myData); but it does not work for me (cannot call that function).
    I ammended it to google.script.run.withFailureHandler(onFailure).appendData(myData);
    However, I keep getting "ERROR: Authorization is required to perform that action." I have already given the authorisation in the pop up box. Do you have any suggestions to solve this?

    • @ExcelGoogleSheets
      @ExcelGoogleSheets  3 года назад +1

      Log out of all google accounts and then login with the right account and try again.

    • @roro8910
      @roro8910 3 года назад

      @@ExcelGoogleSheets
      hi, this worked! thank you so much!!

  • @avhvsmatej
    @avhvsmatej 4 года назад +1

    in 9:17 shows "TypeError: template.evaluate is not a function" how to solve that

    • @0emile
      @0emile 3 года назад

      ensure that there are ()

  • @duckdodgers2843
    @duckdodgers2843 4 года назад

    anyone had success replicating this via a Google Document? Unfortunately, I can't seem to pass the collected HTML object / data values to app script so I can then change some values on my Google Doc via the replace text method. Any help or a link to a working document someone is willing to share so I can see their code would be greatly appreciated.

  • @venkatpavankumar1945
    @venkatpavankumar1945 4 года назад

    how to auto adjust the userform width and height automatically based on the content

  • @xperimentsqf3823
    @xperimentsqf3823 3 года назад

    it's great.. but can we publish them and deploy as web app?

    • @ExcelGoogleSheets
      @ExcelGoogleSheets  3 года назад +1

      yes.

    • @xperimentsqf3823
      @xperimentsqf3823 3 года назад

      i try to publish using deploy web app, but error doGet when open in my computer browser, when i tried open on my mobile browser the page not reach.. how to make it work?

    • @ExcelGoogleSheets
      @ExcelGoogleSheets  3 года назад

      Check my other channel to learn how to do it ruclips.net/channel/UCJebzvfCuA5ymtb79DQm36A

  • @ManojGuptahome
    @ManojGuptahome 4 года назад

    Thanks!! I am learning a lot from your tutorials. However, your web app series has some problem.
    My and are showing in red color. I have checked all subsections of the HTML code are properly formatted ad closed. Why is this in red? --It works though.

    • @ExcelGoogleSheets
      @ExcelGoogleSheets  4 года назад +2

      With all due respect, there are no problems in the series. When you work with code, you have to be extremely detail oriented. One comma, semicolon, quote in the wrong place will throw everything off. Just because your HTML brackets are closed it does not mean you don't have some JavaScript mistakes or simply an extra div or attribute syntax error.

  • @venkatpavankumar1945
    @venkatpavankumar1945 4 года назад

    Hello sir how to increase or decrease the width of the user form.

  • @ivanyumul1542
    @ivanyumul1542 4 года назад

    how can you trigger the form without running the script?

  • @webserviceargentina7025
    @webserviceargentina7025 3 года назад

    hello from Argentina. data its ok but form desapear when clicked the button. somebody have a same problem?? thankyou

  • @elabinnovations
    @elabinnovations 4 года назад

    Is this support the Google sheet Android app?

  • @nickieoakwood6926
    @nickieoakwood6926 4 года назад

    Alright. Got the sidebar all working. Error message everything. Only thing is. Once I have closed the spreadsheet and reopen, no form. Open project and the black play button is greyed. How to get form embedded into sheet so it is there on opening? Di I need to be opening spreadsheet in here somehow
    var ws = SpreadsheetApp.getActiveSpreadsheet().getSheetByName("SALES");
    Something like:
    var ws = SpreadsheetApp.openSpreadsheet(THEN THE SSID IN HERE?).getSheetByName("SALES");
    As you can probably tell am not coder but using G Sheets as my Uni project and other Sheets things like formula etc am cool with but coding is like reading Chinese Mandarin (Simplified).

    • @ExcelGoogleSheets
      @ExcelGoogleSheets  4 года назад

      ruclips.net/video/_Iq2-_WgFdY/видео.html

    • @nickieoakwood6926
      @nickieoakwood6926 4 года назад

      @@ExcelGoogleSheets thank you is tonight's isolation entertainment.

  • @ManojGuptahome
    @ManojGuptahome 4 года назад

    The button click cant be captured

  • @emersonatico9475
    @emersonatico9475 4 года назад +1

    Kindly help me on this " TypeError: Cannot read property "name" from undefined. (line 13, file "Code")

    • @DesignwithAsif
      @DesignwithAsif 4 года назад +2

      instead of writing this:
      var data = {
      name : nameBox.value,
      phone: phoneBox.value
      };
      google.script.run.appendData(data);
      try this:
      var name = nameBox.value;
      var phone = phoneBox.value;
      google.script.run.appendData(name, phone);
      and in gs file try:
      function appendData(name, phone){
      var ws = SpreadsheetApp.getActiveSpreadsheet().getSheetByName("you sheet name here");
      ws.appendRow([name, phone]);
      }

    • @emersonatico9475
      @emersonatico9475 4 года назад +1

      @@DesignwithAsif thank you

    • @taekilkim
      @taekilkim 4 года назад

      @@DesignwithAsif I did try this and still it wouldn't work.... It just doesn't add any new row

    • @DesignwithAsif
      @DesignwithAsif 4 года назад +1

      @@taekilkim Is there any error? Did you type the sheet name properly?

    • @taekilkim
      @taekilkim 4 года назад

      @@DesignwithAsif not really. I just doesnt work 😭😭

  • @davidqicatabua5296
    @davidqicatabua5296 5 лет назад

    Great channel content is great and another useful video.
    However I did try the same steps described in the video and the inputs are not showing in the sheet. What could be the cause of this?

    • @potato_weeb8274
      @potato_weeb8274 5 лет назад

      there could've been an error
      possible error:
      function addRecord(){
      var data = {
      name: nameBox.value,
      phone: phoneBox.value
      };
      I typed in 'name = nameBox.value, '
      I fixed it and it worked

  • @rafaelwendel1400
    @rafaelwendel1400 5 лет назад +1

    Then some funmaker inputs a formula that deletes everything

  • @rainraindontgoaway4881
    @rainraindontgoaway4881 4 года назад

    Is there a way to prevent duplicate entries?

  • @canamiecan2525
    @canamiecan2525 5 лет назад

    How to add in user form print button. I hope you can help me.

  • @nickieoakwood6926
    @nickieoakwood6926 4 года назад

    Exception: Malformed HTML content:

    • @kostnuzula2833
      @kostnuzula2833 4 года назад

      i have same problem

    • @nickieoakwood6926
      @nickieoakwood6926 4 года назад

      @@kostnuzula2833 Hi. I eventually sorted it. Basically you have made an error somewhere in your HTML. As long and boring as it is I had to scan everything and I had done a simple typo! Drove me absolute bonkers. Especially check your form fields and id i.e. = 'companyNumber' etc Even a wrong capital fluffs it up.

  • @vladimirshisterov7978
    @vladimirshisterov7978 5 лет назад

    Hi! Very useful videos on your channel.
    I tried to write a script exactly according to your video, but the data from the form does not load the sheet.
    What could be the reason?

    • @kamilingo
      @kamilingo 3 года назад

      I am having the same problem.

  • @GeraSanz
    @GeraSanz 4 года назад

    is there any way to change the sidebar width? i've tryed a few things without any result! and it's getting me crazy ! please HELP!

    • @ExcelGoogleSheets
      @ExcelGoogleSheets  4 года назад

      you can do HtmlService.createHtmlOutputFromFile('Page').setWidth(300);
      however, with sidebat I think there is minimum and maximum width, so it can only be changed a little. For more control use Dialog.