Skip to main content

Karin
I
see. We have Andy in the ring. Hello Andy. Can you hear us? I think you can, you can unmute yourself. Awesome. Great. Where are you from Andy?

Andy
Derby, UK.

Karin
Oh
it just popped out. There it is. So it's dinner time for you isn't it?

Andy
Yeah
pretty much.

Karin
Did you have any specific things you'd like us to to look at in depth or anything you were curious about. We have Geoff here.

Andy
One
is that I'm, I guess you're using web forms a lot?

Karin
Yeah
I'm. I'm one of the maintainers for the Webform module with Coleman from the core team. So yeah I have to kind of use Webforms a lot.

Andy
So I'm kind of looking at that with
a view to learning as much as I can. I use where it forms a bit. But you know…

Karin
I can give you and you're already using them you say.

Andy
Yeah
yeah.

Karin
So
what I could do is I could I could show you how we would make that schedule task form that would be that would just take us a few minutes. I can show you what that looks like and how we would put it together from scratch. Would that be helpful?

Andy
Yeah that sounds great.

Karin
Ok
I'm gonna go and pop up a screen here. Let me see. You got my you've got an empty desk here. With a separate Canada's slide.

Great. OK. So let's make a Webform! This is my own site but it's also my playground and demo site where > schedule task > CiviLive.

This is also my playground so I prototype little bits in here before I show clients what we can do. So we're in the webform, I always go straight to the CiviCRM tab. Enable CiviCRM processing.

And on the form we're trying to make, there were two contact on the form right? There was a client and then someone we were signing the activity to. I always make the the case worker to youth worker the person assigned the first one always, and I do that because the the first contact on the form you can make that the logged in user you can default it to something so it has a little bit of extra special that if we work to make it a contact to, so we want the existing contacts to pop up – first name last name – and we probably run to an email field because then we can have a checkbox at the bottom whether or not we want to email the assigned contacts.

In contact two that's going to be the client or the recipient of the service and we are also gonna make that an existing contact right because we want it to make it easy make it look up in the database of clients so we're gonna make that an existing client as well and then this form is all about activities. We're going to make the user or the activity type is going to be a user select because we're gonna decide which activities are going to be able to be selected on this form.

The participants is just the client. Participant is actually a bad word here, it's really the target of the activity and the assigned to is gonna be the case worker now what are we going to collect the date, the time, the duration, we might want a subject, we might want some details.

Activity status – I'm going to put that to the user select as well because at times you want to schedule something, at times you may just want to record that it's completed and otherwise you would have to take two steps to get you to schedule it. OK and then I'm going to just pull these onto the form so in no time we've got a truckload of data here a truckload of fields that looks like this.

And I didn't pull in my email probably cause I have a different type of email scheduled for it so I'll have to look at that existing client. Right. We can start looking and we can. Yeah. That's working – oh activity, way too many. So let's go configure some of these elements. The existing contact looks good, email looks good…

The type. So we don't want that massive list. So I'm going to go static options > disable everything and I'm only going to go. Let's just pick two of them. A dental filling and a medical intervention because maybe this is an application where those really are the only two options that people should be able to log through this form. Right. And that's how for the Alex we have all these different record buttons. So the basic needs record form actually has these all split up into even more different types.

And I'm going to have to show you the status. No we don't want all these statuses. Again we want to limit what statuses people can pick and we want to default it to schedule because it's supposed to be a scheduling form. So we'll default it to scheduled but we'll have a schedule and a completed option. And we'll have that on the form. And OK.

So now we've got basically all our ingredients now how to make it look nice. That's the key element for that is a little module called Webform Layout Module. Have you used that?

Andy
Yes yes.

Karin
It's essential. Y
ou know. So here's a layout box and I'm going to make a layout box and once we have a layout box and in Drupal 8 if you've had a chance to look at it they're called flex boxes but they do exactly the same. So now we can move things in there we don't need to.

Well we do want to keep this one lingering around OK. Save that. And all of a sudden we're starting to get a nice form. Oh I've lost my existing contact field

Oh no. Here it is. It's hidden as current user it's the default but we really want that to be an auto complete as well. We still wanted to default to current user but auto complete is nice. But then when you schedule something you could assign it to someone else. I could say, you know, I could say that's not me. That's the default but I could say I'm going to assign that to someone else in my database.

I'm going to sign it to Rob right. Like something like that. So I'm going to clean up that fieldset, I don't like fieldsets very much so I usually end up all these forms we make usually just end up being flex, you know layout boxes or flex boxes and nice horizontal clean lines to make good looking forms. So let me show you the – I'm just gonna go and pull up a screen here from the community health center on the other side. Before I drag it over and yeah we'll go to, so we'll go here. So this is my my calendar on the Alex which of course only includes test data and then if I hit schedule task we were basically not well on our way to creating this form.

And it's exactly how I just showed you how it's put together. If we, you know, it's just that the layout. Right. So this is a layout box and then we've got nice clean lines to separate the elements and the email notification what that does. I don't know if you work a lot with activities but it will just hide the email field.

I'm not if I'm assigning it to myself so I can I can pull up one of my my kids and I can go to myself, right.

And then what I have here is send e-mail notification will pop up my email address and the web form is smart enough that if it's visible it will actually send it out. And if it's not visible it's not because in CiviCRM. I don't know if you deal a lot with activities but there's one switch in a very obscure place where you can like if you go to CiviCRM. Yeah it is a very obscure place. I always forget where it lives until I remember it's obscure and then I know to look there. I think it is Display Preferences, so somewhere in Display Preferences, you can decide whether or not you want to send email notifications to people that are assigned an activity.

So in the community health center we turn this off by default and then we let the Webform handle it on a case-by-case basis because we find that a bit more useful. Not everyone needs to be notified about everything. Yeah. So that's basically what we do with web forums and if we, if we're looking a little bit ahead.

Like I said I'm one of the maintainers on the Webforms I do a lot with the Webforms, and if we look ahead at a couple of examples this is what this is starting to look like in Drupal 8, the theming options are phenomenal we can do masking, you see that we can actually say, I want certain input to be formatted in a certain way. So if I enter postal codes it will automatically. It will also automatically make this an upper case but it will also give me that space in there. And you know you can make this look really slick and really nice and Yeah. So we're well on our way to porting all the functionality for Drupal straigh from 7 into 8 for web forms as well and.

Yeah if you want to follow us you know our Drupal project page is here and yeah that's Coleman, that's myself. This is what we do. We were fortunate we were able to assemble a large a large number of partners that have been able to either sponsor or help us contribute code to get this Drupal 8 effort on the way. And I'm happy to say just two weeks ago I was able to port it to Drupal 9. So we're ready for Drupal 9. Civi itself is not ready yet but the webform Civi integration is ready for Drupal 9.

Andy
Yeah, that's great. Yeah.

Karin
You're
welcome. Any other questions about Webforms or curiosities. OK. Who else joined us here? Let's see. I lost my window Oh yeah. I'm going to stop sharing for a bit get my window back. Ok great.

How do I say that right. You cannot unmute yourself if you want. Another

person. Nadine is here so everyone you can unmute yourself if you'd like to let us know what it is you'd like us to highlight from Geoff's presentation. We just did a little bit on Webforms and how to make a Webform CiviCRM how to get an activity that's scheduled form task out how to create that.

Let me see what other fun things can we do. What sort of things are you making with web forms Andy?

Andy
Yeah. We are – in Derby, they run a, well up to Covid-19 we run a night-shelter. So we actually use webform to sign people in, to sign in using a pretty much minimal amount of information. Just first name, last name, phone number, gender hardly anything really, maybe other any other concerns.

So the idea was to have a Webform, where they could really be very quick, and in fact they were able to sign in more than one person per minute easily.

Yeah–

Because the people who would be in the night shelter wouldn't necessarily want to give much information anyway. And that worked pretty well. And then later on through the through the night the night staff would then maybe update that stuff in Civi so that eventually we have some good records and we could then, you know, do some reports and understand what what was going on. But really the the start of the process was this was this only meant for

Karin
Yeah. I'm
going to show you something on how to speed up intake and speed up recording

Andy
One feature of it obviously is that people would often keep coming back to the night shelter  so if they if they were second and subsequent visit then they wouldn't really need something very much, the person would just type a couple of characters of their name and boom they would be signed them. So it was very very quick.

Karin
Yeah. I'm going to show you another little bit of a Webform that you know just to put an idea in your head, for the next time you're making a Webform and you're looking to speed things up. I'm going to go in and share my screen again. I'm gonna go back here. And I'm going to go pull this screen over. So for the community health center what we have is the staff on the front end. They look for clients in the CiviCRM database but they do it through a frontend view. So in addition to Webforms I use Views a lot. You know this is a search clients and they can search. And this is this is one of my tests. This is one of my daughters actually. And we can go to a specific client dashboard which is the dashboard that Geoff showed.

In this case we have multiple Webforms here. Each of these at the top is a Webform or several Webforms here. But Webform number eight is update demographics. This is a view calendar, and instrument score is also a View to show how the client's done on evaluations of quality of life to all these other assessment tools. And these in here in the yellow highlights are bundles of Webforms. So what we've done is we've introduced a concept where you know, at intake, we have maybe three questionnaires we want to ask. So it becomes a Webform bundle where one Webform goes to the next Webform goes to the next one, to complete the intake process. But quick recording. Record basic needs for instance. This is a Webform and each of these represents an activity.

So if we're handing out some clothing and shoes and some food and snacks and a gift card it can be recorded with, well, the time it took me to check three boxes and to hit submit and technically how to work. So if you if you are ever thinking I want to record multiple activities, it's not one activity per Webform scheduled task is right. Because you're just scheduling one task. But in this case look at how many activities are on this form. We can go in the backend here and look at the CiviCRM tab.

We have thirty seven activities on this form and each of them is a user select where only one is available and there's not a select list but becomes a checkbox and that's all out of the box. We did not have to do any custom coding for it. Those are just some of the really cool things you can do.

So if you ever have a Form where you say I want to record a check into the shelter, and I want to record that we did something else, you know maybe at the same time, you could put two activities on your forms checkboxes and it will look like this. These are these are custom fields on activities right.

As you as you probably know you can extend your activities, make custom fields on them. And that became important to record in person on site and off site so that the Alex can properly report on statistics on how much service delivery has happened off site, in the last couple months. Yeah.

So a lot of opportunities. Essentially what we do is all Webforms and and and Views and what we find we can do with that is we can highlight certain bits of a CiviCRM database. So I love CiviCRM as the data model. I think it's a great storage bucket because it's clean where everything is. But then when we're presenting something to a case worker or where we're presenting it to so Geoff or his staff, it needs to be like this, because to add 20 activities or three activities in the backend would take two minutes. You can't do it. You've got to do one at a time. So I'm seeing this as an as an extension of yeah. How do you get more out of CiviCRM. So we're using it a lot.

So if you're not using Views just yet it's definitely what you want to do in combination with Webforms, it's extremely powerful. Yeah yeah I do use Views, really for more backend reporting too. That's interesting. So you're actually linking from from a view to a Webform. Exactly. And passing in, passing in everything.

Let me go to my calendar because my calendar again only has test data on it. So updates, and what do I have here. I have a z z phone call. OK so let me have a look at it. This is a View right. It's a Calendar View, and this is a Webform. And because in the View I know everything about this activity, I don't know if you can read the status bar at the bottom. But we're going to go and pass on see I.D. two is thirty five and we're going to pass on activity I.D. is sixteen thousand two hundred. No actually one hundred sixty one thousand three hundred thirty seven. And we're going to pass in CID1 equals 2 and we're going to pass in a destination. So there's there's a couple of things we're not just going to go to the web form. We're going to give the web form a lot of information about this activity so if I hit update task, it preloads everything that is there for this activity right.

It's easier to read at the top. Now so we're passing in CID2. So I know what to fill in for client. We're passing in A-ID. So I know what activity details to pull up and we're passing and CID1 so I know what caseworker was assigned to it. And then the destination, that's just a Drupal trick that OK, let's say we updated this. It's actually going to be a longer phone call than we thought it was. No I don't mean an email. Update the task, puts us back to my calendar. So that's what destination does. If you give a Webform a destination, it's where you go next. After you hit submit.

So that just saves people well done and getting a thank you for submitting and getting them like no where you can then direct them to the next View. So yeah all of these these –

Andy
I'm sorry can you just run that by me again? The destination.

Karin
Yeah.
So the destination parameter. Yeah. Okay. You look at it. It's those loops. It's this bit here at the top so that's where you go next. That's. Yeah. If you give a form in Drupal again that's not a bit of custom code but if you give a form in Drupal a destination equals then then it's like oh that's where you want me to go after we hit. After we submit the form which is really useful right. Because you just keep bouncing people between Webforms and Views and they never have to, like, you know, because you kind of know where maybe they want to go next. But that's how I'm looking at the but yeah it's it's a powerful way to to tie it all together. Yeah.

Andy
So
what is your project called Alex?

Karin
Alex.
Geoff, you know that?

Geoff
Yes. So
the Alex started in the 1970s, two nurses in Calgary started it and it was on Alexandra Street. But it's kind of evolved a little bit to be the Alex. Could be anyone.

So the idea is it's there's really low barrier way to access supports, and so all of our all of our programming, you know you could anyone could probably walk in off the streets to our programming and received some sort of social or health support that's kind of the that's kind of what it's evolved into. So it's the Alexandra Community Health Center named after the original street, the neighborhood that we are in. But it's kind of evolved to kind of be a place name for for the Alex, could could you know could be any and anyone. It's kind of an ambiguous, gender-neutral name.

Andy
Great.
Thanks yeah.

Karin
Yeah. Is there anything else you'd be interested in? Or we have one more guest in the room there. Is there anything you would like to see. Sorry. All right I have to stop sharing in order to see your name Milliecop. If I say that right. Is there anything you'd like to talk about? No.

If not that's okay too. Great. And Dina has moved on. Excellent. OK. I think that's all the people we have here.

Actually it's half an hour it was actually pretty quick. I could talk about Webform all day probably. Well there's so many things you can do with it.

Andy
Yeah that's
true. Yeah and yeah.

Karin
Drupal 8
is even another step up. So I'm excited about that. Are you. You're running Drupal 7?

Andy
7. Yeah I mean was it a lot of work to migrate to?

Karin
It probably was pretty tricky, as it was for the module code itself because it's completely different. However the the web form upgrades between projects are not bad at all because there's a lot of people that want to migrate from a Webform module in Drupal 7 to a Webform in Drupal 8. Right. There's a lot more people - there's half a million people using Webform module itself in Drupal right. So there is a lot of that but the code itself was a lot of work. That was a project we worked on for about a year and a half.

And I'd say it's about 80 percent there. Maybe eighty five. We'll always find some bits that aren't quite there yet. It's also I'd just say some bits just really don't need to be there. I'm trying to be mindful of that as well – oh I see Neil is calling us on the main hall, they want to do some closing remarks OK. So we should do that. OK.

Andy
Thank
you.

Karin
Nice to meet you Andy. Thank you very much. Bye everyone.

Staff scheduling with CiviCRM & Drupal Webform and Views

Playback speed: 1
  • Presenter
    Karin Gerritsen – Semper IT – semper-it.com
  • Filmed in
    Calgary, Canada
  • Filmed on
    25 June 2020
  • Length
    26.50 (mm:ss)
  • License
    CC-BY (Attribution)

This is a test project – the transcript was auto-generated with some human clean-up, so please ignore any typos.