Form submission detection

I am creating an online tutoring app. I have a form which students fill with a question and then requests to connect with a tutor. I want the request to appear on the tutor app, so that the tutor can accept the request and then connect with the student.
In the students app, there is a button Connect With a Tutor which opens a form where a student types a questions and submits. When the student submits, I want the Connect with a Tutor button to dissappear and a message saying “Please wait while we get a tutor to appear”. And when a tutor accepts it on the tutors app, this message will dissappear on student app and a message "Congratulations, a tutor has accepted " to appear and a Join Now button to be shown. My problem is, how to detect in the student app, that a request has been submitted, so that I can use that as a visibility condition to make the Connect with a tutor button to dissappear and a message “Please wait till we get a tutor” to appear. How can I send a value along with form submission which can be used as a Visibility condition?
This is how I would like the sequence of steps to happen.

This should be very similar to the Instagram template where the user creates a profile and the components change.

  • I would create a sheet that contains a student email column, a tutor email column, and a finished true/false column.
  • On the tutor request page, show in details style layout, and filter page by signed in user against student email and the finished column is not TRUE.
  • When the student requests a tutor, you write a record and fill the student email column with their email.
  • Set visibility to show request button when student email is empty.
  • Set the waiting text when student email not empty and tutor email is empty.
  • Set Join button to display when student email and tutor email are not empty.
  • Once tutoring is finished, tutor can set the Finished value to TRUE so the record will no longer show and the student can request a new tutor.
1 Like

Thanks for the excellent logic. Only one thing which I don’t know how to do. How can the tutor when accepting the request, have the tutor’s mail appear in the tutor email column?

I found another solution by having a Tutor Accepts Request column, which will be set to true using a switch component by the tutor.

But, I really want to implement your solution of having the tutor email filled in when tutor accepts the request.

A tutor could edit a student submitted request to accept it. When they edit the record and submit, you can use the email special value component to automatically fill in the tutor email when they accept the record. Maybe add a checkbox or switch like you mentioned and make it a required field as an extra confirmation.

1 Like

Thank you very much, Jeff. That works perfectly. Edit component is a huge blessing. Didn’t know about that. I love glideapps!

1 Like

I had one more help required. I would like the message “Please wait till I connect with another tutor” to be present for a period of 120 seconds, after which another message “Sorry, no tutors are available. Please try later” will appear if no tutor accepts the request. Is this possible using some kind of timer functionality. I tried to use the timestamp and create another cell with another timestamp adding 120 secs using a Google sheets function. But, the problem, is I can’t apply to all cells of a column, as then the next row gets added at the end of all the empty rows in the column. Is there any other workaround? I checked the visibility conditions for time in glideapps, It doesnt have a condition related to a time duration.

for reference: