Google Sheets Userform - Add Basic Form Validation

  Рет қаралды 20,830

Learn Google Sheets & Excel Spreadsheets

Learn Google Sheets & Excel Spreadsheets

Күн бұрын

Пікірлер: 67
@nicksonbonke2608
@nicksonbonke2608 4 жыл бұрын
Pleas show us how to update the values in the form. CRUD. Thanks
@66Komodo
@66Komodo 4 жыл бұрын
yes, that would be very helpful
@alexlotion5055
@alexlotion5055 3 жыл бұрын
Does one need to type ( var myAlert =document.getElementById('errorNotification'); var bsAlert = new bootstrap.Toast(myAlert); bsAlert.show(); ) using Bootstrap 5, instead of ( $('#errorNotification').toast('show'); ) Or is there a shorter way?
@zystx
@zystx 3 жыл бұрын
new bootstrap.Toast('#successNotification').show(); Works for me. Don't have to create variables to hold.
@haihuynhthanh3078
@haihuynhthanh3078 3 жыл бұрын
@@zystx thanks so much.
@josephdriver160
@josephdriver160 2 жыл бұрын
@@zystx legend
@franciskunda3773
@franciskunda3773 2 жыл бұрын
You are the best.
@igebaisa8113
@igebaisa8113 3 жыл бұрын
Hi there, I'm just curious, I had played around with the code and typed something like required-field in class instead of typing required. I tweaked the script in validation to this - function validateFields (){ var requiredFields = document.querySelectorAll ('.required-field'); return Array.prototype.every.call (requiredFields, function (el){ return el.value }); }; It gives me same result. This kind of script will have an issue in other browser?
@ExcelGoogleSheets
@ExcelGoogleSheets 3 жыл бұрын
Should be fine.
@ConsulthinkProgrammer
@ConsulthinkProgrammer 4 жыл бұрын
Sir.. why that's both of notification div creating some empty space/margin below my form page when I first load it? And it's back to normal again after submit button clicked. But still, my toast error notification just to far from my button. What attribut or script could be to make that's empty space not happen to my form in the first load and my toast notification just near to my button with that toast script? my form: script.google.com/macros/s/AKfycbwQZp6mlh1pw48t76iezcDW-yZtdqT5BZIhjgASYcry1KnMymlc/exec
@ExcelGoogleSheets
@ExcelGoogleSheets 4 жыл бұрын
add class "hide" to your toasts
@ConsulthinkProgrammer
@ConsulthinkProgrammer 4 жыл бұрын
Thanks Sir... I did it but still didn't work Sir..
@ExcelGoogleSheets
@ExcelGoogleSheets 4 жыл бұрын
Not notifications, the actual toast element. BTW, you shouldn't have 2 divs with the same id.
@ConsulthinkProgrammer
@ConsulthinkProgrammer 4 жыл бұрын
Thanks Sir, looks like I made misscopied in that copy-paste job... My pardon, where I have to put that class="hide" in this sintaks Sir? Success Notifikasi × Data berhasil ditambahkan.
@ExcelGoogleSheets
@ExcelGoogleSheets 4 жыл бұрын
atomic="true" class="toast hide" data-delay="4000">
@kovuruswathi4993
@kovuruswathi4993 3 жыл бұрын
unable to get error MSG as toast in bootstrap 5. Can any body pls explain
@ChukBartowski
@ChukBartowski 3 жыл бұрын
Anyone who has a validation script that doesn't work. This will work (watch the following video and you'll see why classList is here): function validate(){ var fieldsToValidate = document.querySelectorAll("#userform input"); var flag = 0; Array.prototype.forEach.call(fieldsToValidate, function(el){ if(el.checkValidity()){ el.classList.remove("is-invalid"); flag = flag+1; } else { el.classList.add("is-invalid"); } }); if (flag == 5) { //I have 5 required inputs. Change according to your required inputs return true; } return false; }
@marcole1574
@marcole1574 4 жыл бұрын
Dear Sir, I do the same at the errorNotification process but the notification did not show up
@2muchim4u
@2muchim4u 4 жыл бұрын
I had the same problem
@2muchim4u
@2muchim4u 4 жыл бұрын
Did you get to work
@marcole1574
@marcole1574 4 жыл бұрын
@@2muchim4u it stand still. i cannot find the problems
@ikerson
@ikerson 4 жыл бұрын
As @Nguyễn Thị Lan Anh, @Shon Daily, and @Marco Le have said, the Bootstrap 5 toasts documentation page has changed since this video was made. The code in the video AND the new code on the toasts page no longer works. I have searched for a solution, but yet to find one. If anyone solves the problem, please post it here. The help would be appreciated.
@ikerson
@ikerson 4 жыл бұрын
I figured out the problem. The current version of Bootstrap (as of January 2021) is 5.0.0-beta1, but this tutorial uses Bootstrap 4.4.1. So, in order to make the code -- $('#errorNotice').toast('show'); -- work use the old source code. To do this, replace the template code. Specifically, change the Bootstrap CSS and the JavaScript lines. Follow this link for more information: getbootstrap.com/docs/4.4/getting-started/introduction/
@stefantivda7881
@stefantivda7881 4 жыл бұрын
My date entry field shows "dd-----yyyy". How can I change it to show dd/mm/yy for example?
@josedejesusfragozolopez6396
@josedejesusfragozolopez6396 4 жыл бұрын
Estoy siguiendo los videos con interes, pero no puedo ver el siguiente ya que me dice "Video privado". Me puedes ayudar ???
@MichaelKnichel
@MichaelKnichel 4 жыл бұрын
So I seem to be having trouble getting the validation working. I have required in my text fields, but it doesn't trigger the notification at all unless the I change the div back to a form. Then it submits even though it failed the "required" test.
@ExcelGoogleSheets
@ExcelGoogleSheets 4 жыл бұрын
Don't use the form tag. Please refer to this video for troubleshooting kzbin.info/www/bejne/nJ3bm2CHd5pjsNE
@MichaelKnichel
@MichaelKnichel 4 жыл бұрын
@@ExcelGoogleSheets Thank you for the reply. I am already familiar with the logging abilities. I was getting an error about toast not being a function. Turns out my screen was so small I couldn't tell the period in front of toast was actually a comma.
@ExcelGoogleSheets
@ExcelGoogleSheets 4 жыл бұрын
console.log would have shown that error.
@MichaelKnichel
@MichaelKnichel 4 жыл бұрын
@@ExcelGoogleSheets It did, but I didn't see the comma vs period. Resolution too high.
@ExcelGoogleSheets
@ExcelGoogleSheets 4 жыл бұрын
I see :)
@michaelking9156
@michaelking9156 4 жыл бұрын
Awesome video! Pls could you try something on Workflow Approval? There are hardly any tutorials on the web. Thanks in advance.
@VUSDEdTech
@VUSDEdTech Жыл бұрын
agreed. I'm about to need this functionality.
@ConsulthinkProgrammer
@ConsulthinkProgrammer 4 жыл бұрын
How to make radio button being required Sir? Where I have to put that "required" parameter?
@ExcelGoogleSheets
@ExcelGoogleSheets 4 жыл бұрын
Just have one of them checked by default?
@ConsulthinkProgrammer
@ConsulthinkProgrammer 4 жыл бұрын
I mean, if I have 3 dots radio button (yes, no, maybe) for 1 label question: for example: do you interest? Yes No Maybe .. I want user can't go to send the data to my spreadsheet if one of that radio button in that question not checked/clicked Sir
@aneeshtech416
@aneeshtech416 4 жыл бұрын
Thanks for this great tutorial🤗.Can we get script for searchable drop down list?
@fdphy
@fdphy 2 жыл бұрын
If you are using bootstrap, isn’t bootstrap validation function already built in? I thought bootstrap has that inbuilt.
@ExcelGoogleSheets
@ExcelGoogleSheets 2 жыл бұрын
I suppose if you use an actual "form" tag it might be, I haven't tested it though, since I didn't use a form.
@fdphy
@fdphy 2 жыл бұрын
@@ExcelGoogleSheets Ah ok, I didn’t realised that. I have always used bootstrap with form tag
@ExcelGoogleSheets
@ExcelGoogleSheets 2 жыл бұрын
It's best to use the form tag, but I knew there would be a lot of people that would not do preventDefault right and it would submit the form and send the page to nowhere.
@VUSDEdTech
@VUSDEdTech Жыл бұрын
Anyone looking for bootstrap datepicker here's a sample: First Day of Work I handled the new Date(dateValue) on server side functions and manipulated milliseconds and offset based on local time zone. Dates are annoying.
@nguyenthilananh3784
@nguyenthilananh3784 4 жыл бұрын
Now the toast show is changed. The new one is: toast.show() . I've tried it several times and that doesn't work. Please help me out here. Thank you very much
@marcole1574
@marcole1574 4 жыл бұрын
hi e, tác giả trả lời code bị thay đổi rồi em ơi.thật tình cờ gặp ng vn ở đây :D
@ikerson
@ikerson 4 жыл бұрын
I figured out the problem. The current version of Bootstrap (as of January 2021) is 5.0.0-beta1, but this tutorial uses Bootstrap 4.4.1. So, in order to make the code -- $('#errorNotice').toast('show'); -- work use the old source code. To do this, replace the template code. Specifically, change the Bootstrap CSS and the JavaScript lines. Follow this link for more information: getbootstrap.com/docs/4.4/getting-started/introduction/
@nguyenthilananh3784
@nguyenthilananh3784 4 жыл бұрын
@@ikerson Yes, if we use the new css of ver 5.0, i use it and its work $('#errorNotification').toast('show');
@nguyenthilananh3784
@nguyenthilananh3784 4 жыл бұрын
@@marcole1574 Hi anh :D . How nice!.
@hansgremmen8211
@hansgremmen8211 3 жыл бұрын
@@ikerson Thanks a lot!!
@ZahratAlafrah
@ZahratAlafrah 4 жыл бұрын
Hi please give me this sheet download link
@martinluengas1457
@martinluengas1457 4 жыл бұрын
Hi CCC! when I add the validate function and call it in the "afterButtonClicked" function, the form stops working properly: the drop down menu is not populated and the button doesn't do anything. I posted the question on stackoverflow. I'll greatly appreciate your help stackoverflow.com/questions/64253159/how-can-i-add-validation-to-a-form-in-front-end-html-in-google-apps-script
@cechett10
@cechett10 3 жыл бұрын
I've responded your post on stackoverflow with a solution I have found.
@HalaMohammed_83
@HalaMohammed_83 3 жыл бұрын
It's a great video. But unfortunately the toast message couldn't work with me.
@raihannewaz125
@raihannewaz125 4 жыл бұрын
Please give me the sheet download link
@cheewurz
@cheewurz 4 жыл бұрын
Wow!
@josephdriver160
@josephdriver160 2 жыл бұрын
for toast on 5.2.1 - new bootstrap.Toast('#successNotification').show();
@ExcelGoogleSheets
@ExcelGoogleSheets 2 жыл бұрын
👍
Google Sheets Userform - Custom Form Validation
30:49
Learn Google Sheets & Excel Spreadsheets
Рет қаралды 19 М.
Google Sheets Userform - Load Matching Data from Spreadsheet
28:33
Learn Google Sheets & Excel Spreadsheets
Рет қаралды 22 М.
How to treat Acne💉
00:31
ISSEI / いっせい
Рет қаралды 76 МЛН
Что-что Мурсдей говорит? 💭 #симбочка #симба #мурсдей
00:19
СИНИЙ ИНЕЙ УЖЕ ВЫШЕЛ!❄️
01:01
DO$HIK
Рет қаралды 2,6 МЛН
Google Sheets Userform - Dependent Dropdown in a Web App
20:28
Learn Google Sheets & Excel Spreadsheets
Рет қаралды 36 М.
Google Sheets UserForm - Send Data from Form to Spreadsheet
23:53
Learn Google Sheets & Excel Spreadsheets
Рет қаралды 116 М.
Google Sheets Userform - Server Side (Back-End) vs Front-End, google.script.run Apps Script
13:48
Learn Google Sheets & Excel Spreadsheets
Рет қаралды 16 М.
Automate Google Sheets with Chat GPT Macros & Apps Script
15:24
Learn Google Sheets & Excel Spreadsheets
Рет қаралды 78 М.
Google Sheets Userform - Conditional Multi Input Boxes
34:17
Learn Google Sheets & Excel Spreadsheets
Рет қаралды 29 М.
Combine Multiple Google Sheets (Workbooks) to Master Data File
20:59
Learn Google Sheets & Excel Spreadsheets
Рет қаралды 166 М.
Create Sidebar Bootstrap Form on Google Sheets
13:54
Code With Curt
Рет қаралды 19 М.