 All right everybody, welcome to my talk on Webform. Webform is the module for making surveys in Drupal, and that's what we're going to be talking about today. I put the slides up for this presentation at quicksketch.org. It's just the top post, so you should be able to find it pretty easily. And follow me on Twitter, my handle is quicksketch. A little bit about myself. I work for Lullabot. My name is Nathan Haug. I'm quicksketch on Drupal.org also. And I'm the author of a lot of popular modules for Drupal, including flag, file field, image field, insert, and of course Webform that we're going to be talking about today. In Drupal 7, I'm also responsible for the image handling in Drupal 7. The image dials and image fields and all of that. And I also co-wrote the O'Reilly book using Drupal. So let's talk about Webform. Webform, like I said, it's the tool for making surveys in Drupal. There are a couple of other smaller modules out there that are proposing some other approaches to it. But Webform, by far, is the most popular and the most feature-rich survey tool in Drupal. One thing that really sets Webform apart from other systems is that it is actually designed for your end users. That is, your content creators, people that basically have no technical knowledge to enable them to be able to make a survey. Rather than being an administrative-based task, Webforms are definitely intended to be sort of like your front-end users, or maybe not your front-end users, your editors and your content creators. Those are the people that Webform is geared towards. So it has a lot less technical depth really to it than a lot of other Drupal solutions out there. On that, so I say pretty blatantly, it's easier to use than Field Module or CCK. And no, it's not based on entities or on fields in Drupal 7. There's some thoughts about converting it to use fields, but that will basically mean the end of support for Drupal 6. Right now, Drupal 6 still has more installations, at least of Webform than Drupal 7, though it's definitely coming to an intersection really soon. So maybe even Webform 4, maybe that will happen, but there's a lot of upsides and downsides to taking that approach. And Webform is a many-to-few method of collecting data. To demonstrate that, and this is one of the reasons why Webform is so much more different than Field Module, is that you've got your front-end users, and you've got your editors, your back-end administrators, and your front-end users when you look at a Webform node, like a piece of content, you actually see the form as the front-end side of your site. And then your end users are making submissions over to your editors, and your editors pretty much are the only people that are actually viewing those submissions. Not like Field Module, where you're regularly producing front-end content that is publicly accessible, you know, when you create a blog post or something like that, the blog post is available publicly on the front-end of the site. Webform is intentionally geared to make it so that all of those submissions basically are only viewed by a very small group of people, rather than being publicly available to everybody. One exception to that is that an end user who has created their own submissions, they are able to see the submissions that they themselves have submitted. So that's the only kind of front-end user actually seeing any back-end results typically, is that an end user can see their own submissions and edit them. So let's do a quick walkthrough of the Webform interface. To actually just get a quick survey, I guess, of the people in the room, how many people have used Webform before? Okay, everybody. So I might need almost everybody. I might need to zip through this a bit a little bit. Webform 3. Some people have been thrown off a little bit, moving up from Webform 2, which was for Drupal 6. Webform 3 is also for Drupal 6 and Drupal 7. They're feature equivalents, which is a different model than most Drupal modules, and that if I add a new feature to Webform 3, it's the same, like Drupal 6 gets it, Drupal 7 gets it, and that'll continue until Webform 4 comes out, basically, which will be Drupal 7 only, and probably be ported to Drupal 8. So in Webform 3, every piece of content that is a Webform gets a new tab added to it, and this tab is just simply called Webform, and this Webform tab is where you're able to configure the actual form itself. So with Webform, it's not uncommon to have hundreds of nodes that are Webforms and hundreds of nodes that all have maybe dozens of fields on them, ending up with hundreds of fields on all of these different nodes. And so it's a nice way to keep all these things organized that you don't need to end up with 20 different content types. You just have one content type called Webform, and each individual node has its own unique form that you can create. This particular example, obviously, is the basic contact form. In addition to setting up the actual form itself, you can set up actions for receiving email, and there's a dedicated tab for that, and you can set up each individual email configuration that will send an email when a submission is made. And then there's the Settings tab that includes a bunch of other fun settings, things like what message you want to show the user, where you want to redirect them after they've finished their submission. Limits, like how many limits you want to put on, how many submissions an individual user can make, or how many submissions you want total, and things like that. In addition to the Webform tab, another tab is added that is the results, and the results are basically the collection of all of the submissions that you've gotten from the front-end users. The first tab is just literally the list of all of the submissions that have come in, and you can view those one at a time. The analysis is a quick, at-a-glance sort of overview of how many submissions you've got, who filled out which fields. If you've got a select list, it gives you a nice breakdown of which option in the select list was submitted how many times. And the table view is basically all of the submissions and all of the fields all at once. So if you're doing something like making a survey to evaluate like a training or session or something like that, rather than thumbing through all the individual responses, sometimes it's helpful just to look at all of the responses all at once, all on one screen. And it can make it so that you can get a quick overview of everything all at once. And then there's the download tab. And the download tab has got some new abilities recently, which I'll be talking about. But the download tab basically lets you export those submissions that you've received into an Excel file or a CVS, CSV, excuse me, or tab-separated value and import those things into Google Docs or whatever, whatever you would like to use those for so you can actually get some real good statistical analysis on those things. So Webform 3 has been out for a long time now, probably two years. And by far more people are using Webform 3 than 2 now. So these are kind of like the old features that I've mentioned in presentations past that still exist. And I'll just glaze over them. So you can Webform enable any content type now rather than just Webform being the only content type. So a common thing that people do is they will actually take the page content type and Webform enable that content type also. And then they only create a Webform on, you know, maybe a couple of pages on the whole site, but rather than having a whole dedicated content type called Webform, they just Webform enable the page content type and have it so that their editors can just add a Webform to any page on the whole site. Kind of an interesting take on things. Or I've seen people that have six different kinds of Webforms that have those different kinds of Webforms for permissions reasons. Multi-page forms, Webform is by far the easiest way to make a multi-page form in Drupal. And so that can handle back buttons and forward buttons and making it so that users get moved between different pages. User-editable email templates, every single email configuration that you set up, you can specify a template for that email. Just through the UI, it's just a text area so you can customize what that email is for every email that gets sent. End users, this currently only works for logged in users. Hopefully in the future it'll work for logged out users too. But we have the ability to save as a draft and resume, and also save automatically in between pages. So if you have a 20-page form that you think it's unlikely that people will ever actually complete, you can do kind of like the telephone survey kind of method where you just keep asking people questions until they give up, you know, like hang up the phone. You can save all of their progress all the way through. So if they stop halfway through, at least you got half of the information. And total and per user submission limits, we added the ability to make it so that an individual user can only submit so many submissions total, and that's tracked by IP address and cookie, or if they're logged in by the user ID. And Webform is a super-duper hackable module, like it's got APIs like crazy that make it so that Webform has become a really popular module for other modules to extend. The base functionality is great, but Webform has over 100 extra add-on modules now that are out there that are all based on Webform. And you can, I've seen all kinds of things, you know, Salesforce tracking or rules integration is really great, so I've heard integrations of panels and all kinds of things. I mean, if you've thought of using Webform in a particular situation, somebody's probably already written some kind of integration that does something similar. But let's talk about new features. So these things are things that have been added really recently, and I'm really excited about them. Webform really recently added HTML5-friendly field elements, so now we have these really great field elements for email and number, for example. And on a mobile device, the real advantage of this is that this is a plain text field on an iPhone, but if you're using an email field, you get a slightly different keyboard. If you look at those side-by-side, you can see that the email keyboard basically is dedicated purpose for typing an email, so it doesn't uppercase the first letter, for example, on an iPhone, and it adds an at button and a dot button right there so that you can specifically type in that email in a much more easy way. It also has some effect on desktop browsers, on any current version or recent version of Firefox or Chrome in an Internet Explorer 10. Email fields have special browser-built-in validation, so the user will actually get these warnings as they're typing in their email address or before they try to proceed to the next page. The browser itself, it looks like it's like a JavaScript-based validation, but it's the browser-native validation of those options, and so each browser treats it a little bit differently, but they all basically function the same way. There's more info on that on Quark's mode. There's this great link that basically tells you what the support is for different input fields for different browsers. The nice thing is that as far as backwards compatibility goes, any browser that doesn't understand what a pound type equals email field is just falls back and treats it like a normal text field, so it's great that it's 100% backwards compatible all the way back to the earliest versions of Netscape or IE or whatever, and that it'll just render like a normal text field for browsers that don't yet support HTML5, so still 100% backwards compatibility support, but also moving forward to make Webform more mobile-friendly. Let's see, we also added a new number component real recently, number components that can make it so you can force users to input like integers or decimals and at certain levels or steps, as they're called. It's also an HTML5 element, which in the land of desktop browsers doesn't do much other than add this little up-down toggle on the desktop browser. And on a mobile browser, of course, you get a matching keyboard for inputting numbers, which is also great. This feature isn't new, but I always like to bring it up because it's something not a lot of people realize exists in Webform, is that Webform has the ability to do conditional logic where you can show a particular field or an entire page, actually, based on the value of another field earlier in the form, which we'll do that during our hands-on. The UI for this isn't great, but it's absolutely functional, and right now conditional logic is limited to multiple page forms, so you can only do this if you ask a question on page one, and then page two will adjust to the answers of page one. Unfortunately, like same-page conditionals, there's a module that fixes that, it's called Webform conditional, and it has same-page conditional fields, but we'll be incorporating that into the core module itself soon. Let's see, download ranges have got some new abilities for people that get a whole bunch of submissions, like thousands or hundreds of thousands of submissions or even millions of submissions, all of those things have been done before. Webform now can selectively export only a subset of those, which is great for people that regularly download or export their Webform results into some other system, and then it has a handy feature that actually remembers per user how many submissions you downloaded last time, so it'll only download the new submissions since the last time you downloaded the CSV file, so you can just add on those rather than needing to download the whole thing all over again. And this one, this next feature, is by far the most exciting thing to me, and during the demo I'm sure you guys will find it exciting too, and that's the form builder integration for Webform is actually finally done and it really works, and it's stable, all of which has never happened before. So... Yeah, I had to give some props to Acquia. They did the original porting of form builder for Drupal Gardens, so Drupal Gardens, if you've used it before, it also incorporates Webform as part of their platform, but it has a completely different interface that they submitted back to the contrib space called Webform Alt UI. The form builder integration that comes with the... the Webform integration that comes with the form builder module doesn't depend on that module and it doesn't use some of the approaches, like they sort of oversimplified and removed a lot of functionality in that UI, so that can't actually be the official way it works, but it was the basis for a lot of this work that is finally stabilized in Drupal 7. So, since most people in this room are already familiar with Webform, I'm gonna go over sort of like a little tips and tricks section that I'm hoping I'll be able to get at least a couple of people going, oh, wow, I didn't know you could do that. So Webforms are nodes, which has some disadvantages, like the ability that they're not really exportable. You can try using, like, features UUID, and that will make nodes exportable. But Webforms being nodes actually gives Webforms a lot of advantages that we get right out of working with other modules really easily. And that's things like node clone, node export, scheduler, any access control module, like OG or taxonomy access. All of these things work with any Webform that you create right away, which is really cool. So, for example, if you have node export module or the clone module enabled, you get these new options here on your Webforms. And this can be a handy trick to just set up if you have a lot of Webforms that are regularly very similar, but not identical, and you regularly create them. You can make an unpublished Webform that you just come back to and you just clone that Webform. And all of the components all get copied over to the new form and you can reuse that form really easily. It only copies the fields and the configuration and everything over, so it won't copy over the submissions. So the submissions will always be blank when you clone out a new node. And you can use node export. Node export makes it so that you can easily, if you want to set up a form on your local host or on a staging server or whatever, you can use node export, which gives you a dump basically of the node and you can take that over to your live site and hit import and import that Webform onto that site or move a Webform between different sites, which is kind of cool. This one is something that has become really popular recently or more popular recently, but I don't think it's popular enough. And that's using the options element module. If you've ever set up a select list or radios or checkboxes, you've been confronted with this extremely user-unfriendly paradigm of saying, just type in your options one per line and pipe separate the key versus the value and your end users are all like, I'm going to ask the developer to set this up because I have no idea what is going on here. And Webform actually forces you to do a key unlike the Drupal Core module where you can just type in a label, but that is some severe data integrity issues that if you have a typo in one of your labels and you come back and change that typo later, you've corrupted your data because now half of the stuff that's already in the database had the typo in it and half of the stuff doesn't and things go really, really wrong. So Webform forces you to have keys to avoid those data corruption issues. But, yeah, using the value, you can just change that and that won't, that'll just change what's displayed, not what's actually been stored in the database. The options element module gets rid of this UI and replaces it with something that is much more friendly and gives you individual fields, so you can just hit the plus icon. I'll demonstrate this during our hands-on demo. It gives you a plus icon and a remove icon and for the most part will automatically key all of your keys for you, starting at one and then counting upwards. So your end users, if they don't want to know what the keys are, they have no idea what the implications of that are, they don't need to worry about it. The keys are automatically added for them and hidden from them. If you want to, you can hit this customize keys option and you can still specify the manual keys that will get stored in the database, and that's what I found. Once they don't have to think about keys, they don't. So, so trick three is use hidden fields. Hidden fields are really awesome for storing information that only your administrators can see. And particularly, it's really useful for tracking. If you've got a web form that is displayed in a block, which is an option web form provides, you can keep track of which page the user is currently on and what page the user is on when they filled out that form. So if you have something like a feedback form that is like report a bug on this page, for example, it's helpful to know which page they were on when they filled out the form. And you can do that by adding a hidden field that just includes the current URL of that page. Some people might be thinking, I thought this didn't work because it hasn't worked in a really long time. That's things like the server variables which are server, HTTP refer. HTTP refer is the page the user came from. If you want to keep track of where they were. And request URI, which is basically the current page that they're on right now. These server variables didn't work up until really recently, version 3.15 of web form added back this ability that has long been absent by introducing a new type of hidden. Like hidden used to literally be a hidden field on the HTML page. Now hidden fields are actually what Drupal internally calls a value field. So they're never actually a hidden field but they're internally called a value field. So they're never actually presented to the end user at all. They're not even printed out in the HTML page. Which makes it so that we can securely access all of these special server tokens without the end user ever having access to those. And it also prevents all kinds of caching issues. Which is why these server tokens were revoked for a little while day. So that's a good thing to keep in mind. And this one also relating to using tokens. And that's using the get token. The get token is a really handy token that can pull things out of the URL and set them as the value of a field. In this particular example it's a text field but using the get token in combination with the hidden field is also a really great idea. And it makes it so that you can construct URLs like this. Like when you link to your form you can say like the referral code is this or your first name is this and pull that value from the URL and insert it as the default value of the field. Which is pretty cool. So that makes it so that you can keep track of all kinds of things through the URL. Linking to the web form in different ways and that will be included in the submission that is actually passed forward to to your administrators. Let's see. And the last one is use mind mail. Mind mail and web form have some integration with each other. That when you enable the mind mail module you just get two new check boxes on your emails and that one of them is send as HTML so you can choose whether or not you want a plain text email or an HTML based email. And that HTML based email will use mind mail's theming to make it look like your site potentially. Or you can use CSS and all kinds of great things in your emails. And also all of the files that are uploaded into that particular submission can be attached to the email and sent along to the recipient. Which is really cool. So let's do some hands on stuff and I'll demo how to use web form and some of these features that I just talked about. Alright, so let's see. Let's start at the beginning here. Okay, so this is a basic web form here where I've got just the core web form module installed and I've set up a basic contact form. This is really common that people use web form instead of the contact module to build their contact form. There we go. To build their contact form. And like I said it's on the web form it just adds a new web form tab where you have all of your components that you can set up. Let's see. So let's add something like if we wanted to add a component for attachments with this message so if you wanted to make it so that users could also upload a file with their contact information you can say file and add and I'll just leave it the default with all of the just uploading images and then we can go back to view. Web form recently changed over at least in 777 changed over it now uses the file module to do the Ajax based uploading and it supports a progress bar and private files and all of that great stuff. So private files are actually really important in web form if you want to keep because web form submissions are intended to be admin only things it's not a terrible idea to make all of your file. Let's see. Upload directory I haven't set up private files on this site so they're not actually there. If I had set up private files there's an option right in here that says would you like this to be a private or public publicly stored file and web forms integration with private files is now fantastic that it makes it so that the user who submitted the file can still see their file and the administrators who have access to who have access to view the submission or view all the results have access to the file but nobody else does. So alright so on this particular form here okay I've added an attachment now I'm going to go over here and set up some emails on a normal email form let's say if I want to I've already got an email set up here that is just going to email to Nate at local host so it's a hard coded address but you can also do something like set up an email that sends a receipt sort of back to the user saying you know we got your submission and so you can say okay send an email to the value of the your email field so whatever they type in the your email field you can send an email back to them and I'll just leave most of these something like thank you for contacting us as being the subject the from name that's all fine and then because this is going to be sent back to the user we need to see their same submission as before but you might want to friendly this up a little bit saying like we've received you know make a little bit more friendly and they may not have access to actually view their own submissions they may want to remove that also and just send a nice little message to them instead of doing all the things from before webform currently uses its own token system now that tokens are built into 7 and are way more performance we're moving forward to changing all these tokens into Drupal normal tokens but for now we've still got these sort of proprietary webform tokens that provide basic information that you can use in your templates or you can choose which values you actually want included in this email values token so we'll go ahead and save that and then we'll go back to our form and send myself an email so um and I'll leave this attachment empty for now actually um and send an email fill out the webform this is the message that is set up to be displayed when the form is complete and then I can go over and check my email and I've actually gotten two emails here because I was the hard coded administrator email and I was the person sending the email so I got two the first one here is I get to the for your contact request so this is the one that was sent back to the user who filled out the form and then I have a separate submission here that is with a different template that is sent to the administrator so pretty cool you can set up as many emails like that as you want and send them to multiple people and do all kinds of great things uh let's see oh now what I'd like to do is uh go back and do that same thing over again but with my mail enabled so I'm going to turn on the my mail module and my mail in Drupal 7 requires this mail system module in Drupal 6 it works just the same though it just doesn't have that dependency uh and save that and now when I go back if I fill out that form again oh first before I do anything I have to go over to my emails and say let's say I want to configure the one that is sent to the administrator uh these two new check boxes appear uh and include files as attachments and that makes it so that I'll now get all the files that are submitted uh through the form also straight into my inbox so if I do that all over again and submit the same thing uh here come the emails and you can see right there in my inbox that that file that was attached through the submission came right into my inbox which is pretty cool you can't tell too easily this is HTML uh but versus this one you can see that you know it's sort of more uh generic versus this one uh my mail has this great ability where you can just specify I think it's a mail.css if you throw mail.css in the root of your theme uh it'll just add that css file to all of the outgoing emails which is really cool so you can have a css file that targets specifically outgoing emails uh and you can make those uh those look as pretty as you like and this is actually uh like really pretty pretty respectable stuff that actually gets sent out here this is actually uh let's see if I view the source of it here uh so my mail sends out all of the css for your actual site by default which I don't necessarily agree with but um and that's the actual image itself that is being sent in the email but here we are like it actually has like uh labels and form elements and and all that stuff it's actually identical to the HTML that is produced on the website when you view the submission through the web interface of course yeah speaking of submission so those same submissions that I just made uh you can view them through the web interface and this is what it typically looks like when you're going through submissions that you've received uh in web form okay well let's talk about uh let's see conditional logic I've got a second site set up here that is a multi-page web form that has some conditional logic in it and so uh web form has some nice things that out of the box it provides a very good experience for the number of fields and options and things that you have uh web form you don't need to install date module to get a date field for example or time module to get a time field uh and it also has some interesting options like a grid uh a grid component that you can also use that provides a great likert um ability and uh they all just come with it out of the box so this is a particular form that has three pages on it um each one of these pages uh indicated by these dotted lines in the interface and when I go to the actual site itself which is the form uh this form is set up so that depending on the things that I check here on this uh first page the second page will ask me questions related to those first questions so here we go so I've got like the main course is select list versus appetizers being a text field uh and if I wanted to I could uncheck appetizers and say no I'm bringing a dessert instead and go forward to the next page and you can see that the appetizers field is now gone but desserts is there uh which is pretty cool uh web form also has this cool ability that's um not only uh will it selectively show individual fields but it's smart enough to look ahead to the next page and see if there are any fields left at all to display and in the event that there's no fields at all left on that page uh then it will skip that page and go forward to the next one which is pretty cool um you also can use conditional stuff on an entire page break itself the page break element that defines the next page and that'll make it so you can skip entire pages all at once based on one single conditional rather than needing to conditional all of the fields inside of the entire page so let's see let's check out how this is built so uh our individual page breaks here these are the conditional fields here the main course appetizers dessert condiments and other uh and all of those are based on this field here for which course an individual is bringing so this is using options element so I've got options element installed on this site uh and I'm using this customized keys option to make it so that I can specify the values that are going to be stored in the database um so I've got main appetizers dessert and other and then when I actually configure any of these individual components uh down here at the bottom in this conditional rules field set is where the conditional is actually set up so if the component course bringing that's that select list I just looked at uh is one of the values main so that's the key not the value uh here uh then this field will show basically and I I still say yes this interface isn't great but it it functions um it'll be better soon uh oh also a very interesting thing uh on this uh on this particular uh option here for main course uh if you install the select or other module it provides the very nice ability for users to hit an other option it just adds another tax on another option called other uh and when we look at that from the front end it makes it so that when I hit that oh that's not on this one of course main course so I am going to bring a main course uh and I'm going to bring something else right so this is select or other an action it adds this little text field uh and I'm going to be providing some bacon to the barbecue so can't wait and then you can send this send this forward and this this is a some debugging stuff in here so and submit there you go and there's there's the submission coming through uh and all of the conditional fields to get skipped uh are intelligently not included in the results so when I actually look at the results for the submission you know the fact that I'm bringing a main course is selected here uh and then the main course I'm bringing bacon but it doesn't ask me about like the condiments or uh accessories or desserts or whatever else whatever options were there they're all skipped over which is pretty cool alright um well now I've got uh uh my most exciting demo which is uh web form when enabled with the form builder module so form builder is a project on Drupal.org uh and form builder includes the integration for web form in it so you download form builder and it includes the web form integration that makes it all come together and web form had or form builder had some dependencies so in Drupal 6 days you had to install jQuery UI which usually I mean you had to install jQuery update and all of this business of getting the right version storage and it's a real pain it's possible it works perfectly fine for Drupal 6 if you get the right versions all lined up uh but in Drupal 7 thank goodness jQuery UI is just included in core so you just install it and that's pretty much all it needs it it does depend on options elements for making select lists so but uh let's go to so same thing as before web form tab and a results tab the only difference here is that the web form tab is merely replaced so all of the rest of the interface is identical the only thing that has changed here is that this interface for setting up the individual fields has changed into a drag and drop interface for configuring the form so configuring an existing field is just as easy as clicking on it and the configuration appears down below um and then you can do things like you can set a description on things um you know set a description on things and in Ajax updates up above as you set any particular values you know like these are always the examples that I use even though they don't really make any sense on on names uh and as you edit any of these properties at Ajax updates it's doing a bunch of Ajax requests in the background and Drupal is re-rendering the elements and then passing it back up which is really cool and then adding or moving fields around so I'll just drag and drop if you want to add a new component drag it in from the side um it actually does some uh some great things let's see where's a grid I love grids um they've got some great they look great when you edit them so things like you know I want to say randomize the options and randomize the questions you can actually see up there at the top like as these questions are being added that they're all up there and of course this doesn't really make any sense the way that this is actually um yeah randomizing some of these things so yeah pretty cool and actually saving it you know you just hit save and then you go to the front end of your site and your form there it is right it's pretty sweet and this integration is now complete to the point that it works with all of the stuff that Webform Core itself works with additional Webform components and some things like select or other isn't entirely supported yet the option basically just doesn't exist to turn it on but I think all of those things will be will be fixed in time but right now if you just use the Webform base functionality or if you use modules that don't affect the actual form itself like Webform validation is a really popular module that lets you say on this in any individual field run a regular expression on it or make sure that two values are the same if you want to have email and confirm email Webform validation can add options like that so it's really pretty awesome and it's really it's really stable now so it's great that that option is available alright let's go back to the presentation here I'll wrap up a little bit so the to-do list the coming soon features list I do this every year and I'm sad to say that better view support has been on the to-do list for at least the last year the view support is respectable in that you can actually make submissions or views of submissions just like you can make views of nodes but you can't actually make views containing the data of an individual submission so you can only say what are the submissions for this node or what are all of the submissions for this user but you can't actually make a view that contains the data that the user submitted yet but that patch is actually coming along really nicely we'll probably be able to make that happen soon so let's go back to our tokens this patch is really really close to being done and that includes a crazy upgrade path that goes through and updates all of your existing sites so that all of the old tokens will convert to the new ones we just have some questions yet to be answered about how to deal with things like the get token for example some of those things aren't common to Drupal but webform specific progress bar from multiple pages this has also been on the long list of things to do just add a markup field just let you add any HTML you want add a markup field at the top of each one of their pages and say you're on page 2 or 3 or whatever it's a pretty cheap work around but we'll get a native progress bar here soon same page conditional fields like I mentioned earlier and real translation support this actually is not on the to-do list this is actually pretty much done but it's waiting approval so webform now actually has real translation support finally and it makes it so that all of the individual descriptions and individual options like if you're on a select list or radio buttons as well as the labels themselves anything that is possibly translatable webform now exposes that publicly to other modules so that other modules can actually handle translating of all of the webform options so this sandbox project here is called webform localization that should receive approval soon and webform localization makes it so that you can translate things in the two ways that you can translate by either doing content translation where you have multiple nodes and syncing across them it can do that approach or it can expose all of your strings to the i18n strings module and make it so that you just have the one standard interface for translating all of the rest of the strings in Drupal just for webform so it's really cool and I've got one more thing and that's something that those in the know have already heard and figured it out and that's webform, well we now have a logo which is kind of cool webform has as many installations today as Drupal itself did three years ago which makes it a really big project that is it has a need to stand on its own and a need to get a proper amount of attention in order to continue its development and so to do that or to accomplish that goal we've launched a new site called webform.com and webform.com is webform as a service so it's a survey monkey or a woofoo it is literally just webform on a website it's got some interesting backstory that I'd love to talk about it's an organic group site so you can have permissions on it and subsites and things that are on their forms but it's an excellent showcase site for webform it includes all of the stuff that I've talked about today the form builder integration, the HTML5 it's responsive so it's very mobile friendly and all kinds of great functionality and this site I think is going to be a huge thing for the development of webform because it does a couple of things it makes it so that as the developer of the module I have a real strong reason to actually develop and continue adding new and exciting features that people are wanting right now I basically use webform as a contact form on my blog and that's the extent of my personal use of webform so I know a lot of people use it for a lot more than that and I'm always excited to expand and develop the module but now with a site that utilizes the full capabilities of webform we'll really be pushing the envelope for more features and actually make it more feature competitive with a lot of paid hosting solutions out there the design I have to say I give a shout out to Ann for doing the design of webform.com and if you go to their booth they're using webform.com for their survey to win, I can't remember what it is an iPad or a Kindle or what was it? A snowboard! and in collaboration with all about my employer so webform.com I'm really excited about the launch of it you can go there today, you can sign up it's free, right now it will be a subscription based service since the purpose is to make it so that webform itself is sustainable that to make it so that the webform can get dedicated time and resources to actually make it so that we can make webform into a really awesome project more awesome than it is already alright well that's that's it for my presentation questions please come up to the mic you might have already addressed this and I don't know but we have the need to do a survey of questions that's like a quiz and there's a right answer and a wrong answer to the quiz and then we would like to compute a percentage of correct answers and then icing on the cake would be passing grade than we have conditional action we take and if they get a failing grade we have conditional action we take is that all possible now? yeah so can webform be used as a quiz tool basically I get that question pretty regularly and webform itself I don't feel like that's functionality that should live in the core module itself and it could be written like a webform quiz module for example I still haven't seen it though unfortunately there are some of the abilities of the project itself to support quizzes through a module that basically all that you really need is something that says what's the right answer you could even do something like use the default value as the right answer and that just never gets shown and then you wouldn't even need any UI improvements at all so that would be a clever way of handling it but I've never seen it actually implemented so well within the realm of possibility but not a feature that exists right now hi I was wondering if there's an easy way to put a time delay on the auto responder if that would be hard to build because we had a client request can we make it seem more like the auto responder comes from a human rather than a machine human cannot write an email instantly yeah webform does have some nice abilities already where a built in feature is underneath the form results let me go back to to the one where I was setting up a whole bunch of emails under the form results there's this nice section or a nice option here when you're viewing a submission there's this link up here if you have print module enabled this it also enables print and pdf versions of individual submissions which is interesting but out of the box the only action for this individual submission is to resend the emails and so resend the emails when you click on that you can choose which people you want to resend the emails to and it will resend those emails what you could do is prevent Drupal from sending the email initially and then use the API to fire that function or that form on cron jobs I can't there's no built in functionality for it but it's just a smidgen from actually being there so all of the infrastructure is there in place but I haven't seen a module that does that so it could be like web form email delay module or something like that thank you great presentation today quick question I'm often struggling with like whether to build something with web form or to build it as a content type with fields you know it's much easier to design a web form even before forms build integration especially for end users but it seems like sometimes I can do more things with the results if it were a node but I like it do you have any comment or thoughts on that and one thing is that I'd like to make it so that web form doesn't have those limitations first of all so I think adequate view support for submitted data would really go a long ways to removing that obstacle of it being more difficult to work with but really when it comes down to it on the project page itself I sort of give you the breakdown that if you are creating a lot of forms and they're regularly changing or you're scheduling them to only be active for certain times web form is the definite right solution there if it's a central part of your site that you set up and never ever change say like a single donation form or the contact page for example it gets a little bit murky as to what's the right solution there they've got some different abilities and if web form has an ability that you want that nodes don't it's a good way to go even like things like building queues or workflows or process flows around the submission results I don't want to just see it's there I want to assign I can't think of a great example I'll top my head stuff like that I want just a little bit more and a view is definitely right step in the right direction the market is like I've responded to it or I've read it and actually the ability to mark something as responded is something that is high on my to-do list actually because after looking at some competing products there's an excellent WordPress module that does forms and they have the mark as red and star functionality essentially identical to Gmail and I was thinking gee that would be great if this listing of submissions here actually had like a checkbox along the side of red or star or whatever but what you can do in the meantime is that Webform has the ability on any individual component if you want to add a checkbox for red or something like that there's this new option down here called private which I really should be able to admin visible only or something like that which makes it so the end user doesn't see that but administrators when they view or edit the submission do so it makes it so you can do something like this thing that's been handled or you can put it into a different workflow state or whatever based on private components so yeah my goal is to make Webform do everything you want thank you great job on the Webform and good luck with Webform.com I'm building a contact us page and one of the options that I want to put there is the ability for visitors to contact different departments of our company so what I want to do is depending on which option they select from the drop down list an email will be generated to that department what would be the best way to implement something like that where the email is generated based on the option that is selected right, yeah Webform has had that ability for ages but its implementation has always been really bad that in Webform right now you can set up an individual email when you configure an email you can set it up to be a component value like this and it shows you all email fields here it also shows you all select lists so if you set up a select list that has the key of a user's email address and you say that that is like the support department then when they select support it will email to that select list key which is their email address this is a bad thing though because it's literally meaning that in your database you're storing people's email addresses as the values to submit a data and it also means that if you view the source of the page you can see people's email addresses so lots of bad things happening there yeah, so there are other solutions though long term is that the conditional support is going to be also added onto these email email configurations so each email configuration will have conditional actions just like individual components do but in the short term the best solution I found is to say you might look at webform rules module because webform rules module makes it so that you can do all kinds of crazy stuff based on a submission including sending emails so it would supersede the webform built in interface for adding emails, thank you I love webform I'm not sure if this is more of a conditional question because it is I'm asking about a conditional we have a worldwide distributor submitting sales records and the Japanese distributor needs three extra fields that none of the rest of the world needs and we would love to hide those so just be able to use a token to say if this registered user or authenticated user is logged in these three fields show up, is that going to be more webform conditional or can I use that I haven't seen the token available for who is signed in and we want it based on who's signed in yeah, yeah I like where your thoughts are going yeah, you can use webform in all kinds of crazy ways and that would be a really clever usage to have a hidden field and you can use a hidden field as the subject of a conditional, you say that they're logged in users they're logged in, the entire site is authenticated if they're logged in users you could set up a hidden field that actually contains something like you could set up a hidden field that had a default value that is a property on that individual user actually even what you could do is you could say even in webform today I don't like our user tokens but you definitely could do this where you could say take the user's user ID and set that as the default value of a hidden field and then you can use a conditional to say if user ID is greater than zero or if you could look at a particular role or whatever to make it so that you could say I can only show this field if some condition is met about the user and just a tip if other people need this I use the hidden field when we had our sales records and they were going to order a stamp because these people are older than that department to put the routing I entered the license, I did that and I used a hidden field and just did plain text and put their little stamp data on the hidden field so the administrators could see that and not have to order a stamp and they change it as they need it and now actually with the private components that's a really common way to do that too now so you could do like a private select list or checkboxes so rather than having a plain text field like they may have right now you could actually have like a checkbox saying yes this is approved or something like that yep, yep, yeah with now any individual component you can say this component is private so private means if you can view the, if you have access to this tab to the results tab then you can see a private field yep yeah can you describe the interaction with the back end when a user is putting into a multi-page form so are the results saved for each page in the back end or is it all happening in the browser with Ajax hiding pages selectively how does that work? yeah okay so how do multi-page forms work on a technical standpoint well, no matter what with a web form after every individual page if you've got a multi-page form the status of what the user has submitted is stored in the form cache database table or if you're using memcache or some other system then in whatever caching system you're using and in between there that's where it lives it doesn't get saved into the database in a way that is permanent at all unless you enable like an option like this automatically save this draft between pages and that makes it so that after every individual page it's saving to the database in a permanent administrator available or accessible location if it's just in the form cache table if they don't complete the form it disappears basically but yeah it's stored in a temporary location up until the point that they actually submit it unless you're using this option you mentioned donations any interaction with like a gateway like authorize.net to make it a secure form for a donation or something yeah jeez I'm betting you're on Drupal 7 right we're 6 oh hey lucky you I wrote this module called webform pay and webform pay integrates with the pay module that integrates with authorize.net and payfo pro and paypal and all of these different things and you can see from the screen shot here it basically just adds a webform component called pay and so you can add a webform component that can take credit cards or whatever it's unfortunately kind of languished a little bit because the pay module itself hasn't been updated for Drupal 7 at least in a way that's supported which has made it so that I've really tapered off any interest in this module if pay module isn't supported there's no point in maintaining webform pay so for now though Drupal 6 we use this on a lot of our sites to accept donations so that's an option that's pretty stable yep and stable thank you one thing I found interesting with the ability to go in and download your CSV or tab files from the last time is that something that you could set up like to email those to let's say your administrator or whoever but like you know email those interim results every two days as a CSV file or an Excel file or yeah like an attachment to the email as a CSV yeah okay so the short answer is not without custom coding right now fortunately though that will not be the case very soon actually there's an excellent patch in the queue that adds Drush integration with webform which would make it so that you can export results through Drush which would be pretty freaking cool and using that you could set up a Cron job or Jenkins job and use Drush to export only new submissions and then pipe that to a mail command and then you could then export stuff on to a temporary location and email somebody all through a Cron job so that's good something to look forward to hi I'm wondering if there is a possibility to send an email to a multiple to a role to a role all the users of a role yeah or multiple users yeah yeah I think I'm gonna have to punt that one to rules so you could use webform rules module which can do pretty much anything you can think of with any arbitrary stuff that Drupal provides so upon a submission since you can send an email and you can choose the recipients of those emails as being all of the members of a particular role as far as I know rules can do crazy stuff so alright and this is probably the last question and then we'll at least call it good but I can talk after the presentation so lucky for me so from the data that comes from a webform other than exporting it is a way to route it to a system for further processing like CRM like that an external CRM or sales force or yeah sales force let's say or anything I mean is there how do people kind of connect their forms the data into I've seen webform integrations with just about every CRM that I've ever heard of most of those implementations though are really pretty simple actually some of them are kind of hacked up jobs too but the basic idea of any module that provides a CRM integration is that webforms there's nothing special about this form that webform is created it is Drupal Forms API which means that you can Drupal form alter that just like any other form in Drupal and the officially sanctioned way of adding additional actions is simply to form alter the submit handler so you add another submit handler onto it that usually would do Drupal HTTP request and shove that information over to sales force so add a submit handler use Drupal HTTP request to send that external data somewhere else that's good enough alright good well thank you very much for coming oh and please also fill out the survey saying how you thought of it I shortened up a URL for you that goes to webform.com just kidding goes to Drupal Con Denver that for rating this presentation