Introduction to the Entityform Module for Drupal 7

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
so entity form I'm Wayne I don't think I introduced myself to YouTube okay so alright so what is in any form do so it allows you to to module that allows you to create customizable forms the simplest of way it should be like a contact us form you can also do surveys or other sort of other similar forms with it so the module it's most similar to is the webform module a lot of people have used web form module before I assume so the question is why would you use inity form so if you look at the use statistics for any form versus web form since they do sort of serve the same goal any form is a lot less popular than web form by order of Magnus order of magnitude at least so so why would you choose it that's what I'm going to sort of cover in this talk so first some of the reason yeah so if you just go into the popularity you choose web form some of the reasons those numbers are so different here's web fourth been around a really long time so the earliest version I could find was four four four and I don't know if any previous versions of Drupal or even still on drupal.org so it's possible an existing before that but it's been around since 2005 the first stable release was four seven and oddly enough they're still over seven hundred reported installs the Drupal 5 version of web form out there so and they don't unfortunately don't report the four seven installs but I'm sure there's probably some of those as well and a web form is up to the 4x series so it's been sort of rewritten four times entity form is much much newer so the first version was released in 2000 of 2011 and the first stable release wasn't until 2012 and it's gone through one sort of major revision so it's on the qyx series so it's much newer that's probably the predominant reason that it's but for the lack of popularity everybody knows web forums been around for ages but the two modules are actually really quite different under the hood even though they solved the same like goal and like how do I build like a simple form so in any form all the submissions or Drupal entities which I'll talk a little bit about when we get into the demo but the entity system for Drupal 7 all your users nodes comments anything else in the system are entities for the most part and so entity form submissions are also entities which is not true of web form web form sort of has its own it's off on its own it's not necessarily doing things in the drupal entity way he uses entity form uses the standard Drupal field system so if you create custom content types and add fields to them or add fields to a user entity form works exactly the same way so versus web form which has its own field system its mirrors many of the features of the other one but it's not the standard Drupal field system it's kind of its own thing that it built again way back in the true pool for seven days or something and that it has just sort of continued with up to this point so because it uses entity form because entity form uses standard entities and fields you get a lot of out-of-the-box integration it just sort of works with other Drupal stuff that like rules and views which I'll show in a bit here and you can also use any sort of standard Drupal hooks so like if you're writing code you can hook into entity insert and the update and the delete now web form has some parallel hooks but again it's you know they've got their own set it's not like the other stuff that everything else uses and report most other things in Drupal use and another difference is that because it uses a standard field system it the data for the form submissions is stored differently in the database and that has some repercussions as far as like really big form so I'll come back to that at the end all right so let's just do a demo so simple demo let's do a contact us form so turn on alright so in the form requires the entity API views and some other dependencies and so any form is different than webform what in that webform creates a node type or you can set up a node type too and then when you would go make a new form you'd go to add content and you would add one of type webform entity forms are defined sort of it as like a at the system level so there here under the structure entity form types and so creating an entity form type is similar to how you would create like a new content type so here you can create a contact us you can choose a redirect path like if you want it to go to a particular page after you submit the form so we can go to the front page and you can access settings usually like who's allowed to submit the form so we can allow both logged in users and not logged in users to submit the form we can do a preview page I'll save that for the next demo the submission views this allows you to override the listing of submissions I'm going to leave and we'll just take the defaults entity form has built-in draft capability if you want people to be able to save a draft of a form before they submit it that doesn't make sense and it contact us for contact us form but it might make sense for other types of forms like if somebody's saving a survey or or some other sort of quiz or test or something and then they they're not sure they want to submit it yet they you can turn that on and it's built in you okay we can provide a menu link so this is similar to like when you create a note or something so we can say contact us and stick that on the main menu URL path settings so we can this is again similar to a node we can put in a path setting and form overrides allows me to set submit button text or override some of these things the only thing here maybe is like maybe I'll call the submit button send but there's some other things here as far as like a confirmation message that shows up at the top and whether or not and other messages that might show up all right when you create the entity form then you get thrown into this the field interface so if you've done made a custom content type before this should look familiar it's basically the same you have access to sort of all the standard field types so we can create a contact form make it a required field and we can make this a long text for the message all right so now we've set up the form but we can get a preview of it over here and then if we go back to the home page here it is I told it to put it on the main menu so it shows up up here and we can form alright and it saves and keeps me back to the front page which is what I told it to do if we want to view the submission we can go up under structure again entity form types and on this row where it says contact us we can view the submission here and we have some options either - we can view the submission individually or we can view a table which the table will sort of put the put the the contents out here in separate columns obviously that's not a great idea if you have like a million fields but works okay for this now one thing with our contact form is I set this up as a text field so there's nothing actually to validate this email so I can actually just like put anything I want in here even if it's not a valid email and it'll take it so if I wanted to validate this is an email remember this uses the standard Drupal field system so there is an email module that provides an email field so if you enable the email module then come back over here we can delete that will delete the existing email field and/or replace it with an email type field and that's pretty much all we have to do that'll automatically validate that somebody puts in something that could be an email address doesn't validate this real working address but that it's valid by its syntax so now if I try to put something that's not an email address in there then I get an error message if you want to set up notifications that there's a separate module for that and notifications for entity form are all driven by the rules rules module so if you've used that before you can go in there it's got sort of a simplified interface for it which we'll see but you you have the full capability of the rule system to do all sorts of advanced stuff which I'll show in the next demo so do a simple one you just turn on in any form notifications there's a bunch of dependencies for this which I've already downloaded on the system but finding the dependencies download them and then if we go back over here to the entity form types there's not a link for it it's sort of semi hidden if you click Edit there's a new tab rules up here so you click the rules tab and then you can add an admin email notification or email submitter so I know that's kind of small but emails submitter notification so for a contact form I probably wouldn't do one back to the person who submitted it and yeah I don't know what these they don't seem to cause any problem and so when I add one of those then I can put in subject like a body which you can say like and then there's a show submission will include the contents of the submission and then who you want us in to do right now if we go back in to get one let me see if I can get it dragged over there some region won't dry oh because that's fullscreen yeah so then I got my email here okay all right so that's the simple demo but now let's all that stuff frankly if that's what you have to do like it's pretty easy to do that with webform and you know you wouldn't be a big deal deal with webform if you wanted to cuz it's a little more complex with the entity form to get it set up and you could see it was a little rough there's some error messages thrown out that I don't think mean anything so but let's look at something more advanced something to be much more difficult to do with webform not possible but more difficult so in this advanced example we're gonna create a room booking system where you can book rooms and order food service for meetings sort of by submitting this form so I've already done a little bit of the work I've created a couple content types one for one for rooms that has some a few fields like the name and has an image capacity and some set up and take down time required for those rooms so that people don't book them too close together and then for food service I've created a couple food service options that you can order for your yeah but like I said both of those are just content types here so nothing too special there all right so let's make a rid of this registration form or signup form so we will start by turning on it entity forms I'm gonna go ahead and turn on any form of notifications we're gonna need that eventually okay so we'll add a reservation form and we'll have a redirect I think that one page was the room's page okay well for this will only allow like authenticated users to to use it because maybe this is going to be on your internet or something where people are signing up in-house so we will do a preview page this time we'll leave again we'll leave the submissions view draftable is probably not necessary here we'll put a menu link and we can give it a pass and we'll leave the we don't need to override any the buttons or anything we'll just see for those at the defaults okay so now we're going to need to set up a few fields for this now I've installed several additional field types on this site so let me just point them out I installed the date module because we're gonna need some way that people can sign up for you know tell me when time and day that you want to sign up for the room I've also installed the entity reference module because I need a way that people can specify which room in which food services that they want to register they want to reserve so with those what I can do is I can I'll make a name field it's just a text box whose reserving it we'll need a date field or win but when you want it and so yeah we'll go down the hour and minute we'll collect an end date so that we know when you're done with it make that required so we're going to need to entity reference fields here one for the room that you want to sign up for and one for the food services you want so we'll have room gonna be reference we'll make it a select list because there's only a few of them so this entity reference allows you to select some other entity and link it into this submission if you haven't used entity reference before so you might need that too in the future I'll leave it up now alright so we'll set up one in any reference for the room and for food services we're actually going to allow you to sign up for more than one at a time so maybe you want coffee and donuts so again it's going to be an entity reference but this time I will use autocomplete just for variety and because I want to do more than one so this will be for food service node won't be required and let's see all right so I think that's all we need for that so now if I go back to the home page oh it's on the wrong needs to be on the main menu okay so now I have this reserve a room link and I can click it probably should have picked different defaults for that date field because obviously I don't want to be able to reserve it right this second but I'll put in my name and then we can like reserve it for Wednesday and we'll say 9:30 to 11:30 the room I want I'll take the conference room with whoops messed up on the food services one yeah but I didn't I didn't make it a multi field so I made a mistake there let me run back here so food services if I edit this field it needs to allow unlimited number of values okay you'll take the conference room and we'll get coffee and doughnuts all right now because if you remember I turned on the preview option so this is what it does before I actually submit it it shows me again exactly what I'm about to submit I have a chance Club I can change it or submit it so I'll go ahead and submit it it redirects me back to here all right so again if I want to see those submissions I go under the structure and any forum types and I can look at the submissions view them individually see exactly what's been signed up for but I'm going to show you some other ways that we can generate notifications and and have easier access to like when when is this room signed up because obviously looking through this table of submissions is going to be a pain after a while so let's do notifications first so the content type room has a field that you couldn't see on that other if you couldn't see it on the other forum or that the view the listing but it has a notify email so if I go under here and actually edit one of these the notify email here is auditorium as ingenuity calm calm and there could be more than one potentially and the conference room is a different one conference room that's ingenuity calm so maybe these would be in different buildings different people are in charge of it for the food services I didn't set up different notification email because typically if you're in food services like one place you're gonna get it from so what I want to do for the notifications is this who whatever room you sign up for I want to send a notification to the email that corresponds to that room and if you sign up for any food services I want to send one notification not multiple one to the director of food services or whatever to the food services address and so that's what I'm gonna show you how to do here okay so under structure any form types we'll go back here under edit and rules now we're not going to be able to use the simple admin and and/or submitter rule sets that are up there already we're going to need to create our own so we can do that down here under add a new entity form submission rule and again it throws these areas that don't seem to cause any problem though so we want to add a new rule we'll give this a name like email room manager and you can take the defaults down here so now what we need to do is set up we need to set up the actions that will allow us to send the whatever linked room it is and send to that email sends a notification to that email so if you've ever used rules before if you want to access a field you have to check if that field exists I think first or actually no the first thing we need to do is see what so in my conditions I could have more than one entity form on the site there might be the reservation form but there might be some totally other forms too so the first thing I should do is make sure that I've got the right no I don't need to do that sorry right back up I don't need to check which type of entity form it is because that comes at a later step so all I need to do here is check if I need to check if the yeah I need to check if the entity which in this case is the form submission has the room filled on it okay this and the only reason I have to check that I don't I know it is going to have it but the only reason I have to check it is rules doesn't know the rules module this interface doesn't know that it's going to have it and so if I don't do this check first I won't have that option here I won't be able to select you if you look here there's no sort of I won't be able to pull it up so I've got to check that first so first we'll check that the filled room module or sorry field exists on the entity form and one more thing I need to check that that email field exists on whatever is in whatever is in the room whatever the linked room is so now you see now I've got an option for filled room here so I can say okay whatever room they selected make sure that that room has the field notify email that's where I'm storing who is the manager now those two things give me access to all the fields I need so now that here in the actions I I set up that notify email as a multivalued field so it's possible there could be more than one person who needs to be notified because of this room usage so I'm gonna add a loop to loop through all of the people who are listed they're all the email addresses so I'll add a loop and then that loop will be over in the entity which is the form submission filled room so now I'm on the room node and then I'm going to loop through the notify email and for each of the items in that email I'm going to add an action to send mail and this one works better if you switch it to data selector so you can the the list item the thing that I'm looping over is the email address so I want to that is the to address that's what's in that field so the list item goes here for the to the subject is whatever you want this like reservation for and there's some replacement patterns down here so see I think filled room yeah filled room should be here so if I use that it should give me a nice customized title for the email and then I can say someone actually I can put their name in here I think field name yeah this person reserved the room now notice this is actually we're seeing one of the benefits of using an ende form right here is that I have access to sort of all the normal tokens that you would have if you're doing any kind of emails this isn't nearly as well done with webform you can get some things which you can't get sort of you can't drill down to the level you can with this and then the other thing that will be useful here is I should clued the entire submission so that all the details and that is available down here in the entity text export token and there's actually a version that's already formatted for email so I'll put that in the message as well and I think everything else can be left at the fault right so that should loop through and email everyone who's associated with the room I sign up for so the next thing I need to do is let's go back oh wait there's one more step here under rules for this int for this particular form there's still no active rules here so I need to assign that rule to this form and I do that up here you can see now that I've added that it's a new option under here so I can add that and now that's been assigned here so let's make one more rule to email food services so I'll go kind of quick here services now in this case what I want to check is entity has filled filled food services food services is not empty that's what I need to check because I that's all that's actually all I need to check is data value is empty entity food services but then I can choose negate so if the if food services is not empty on this submission then my conditions pass so then my actions can be this this part's actually simpler because I'm just gonna send one email to like food services and include the full submission which includes should include the room and everything else that was in the food that was selected oh woops that's the wrong place okay so for the subject and then for the book message body we'll put the actual submission in there yeah I have no idea what happens if you do that well it probably works I just don't know what's gonna come out well what you're gonna see but yeah maybe okay so now I need to do that one picture Stephanie to assign the email food services to this form now I go back to the home page reserve a room all right we'll pick the conference room and well as coffee actually know that it's a lunch meeting so I said Bucks lunch okay now if it worked okay so here's one of them you can see it came to conference room his ingenuity so that was the that was all in the conference room since I specifically signed up and it's got the the full submission and then the other one came in here to food services that's ingenuity all right so the notifications came out like we wanted there's no other notifications nothing up my sleeve I don't want something like you know spam showing up one put my email up there okay so that's our notifications next because those entity forum so because of those entity form submissions our drupal entities i said we can integrate them with views and rules and several other modules that are that are out in the drupal space so one of them so we have full views access to the submissions but so what that allows us to do is like the calendar module for drupal works through views and normally people would set it up where you have nodes with dates on them and then you can create a calendar of those but you can actually do that for entity form submissions as well so I think I already have calendar okay so I've already I've installed a calendar module for drupal here already and so the way you create a new calendar view as you backup there you go to the views interface and you say add view from template and then you have to find and this is very confusing but you have to find the right date field that you want to create the calendar on so it's a calendar view of field date on on in any forms that's the one I want and I'll call it room calendar all right you can see that right right out of the box it's showing two submissions that I made on the 29th and 30th so we can clean these up a little bit so that they're like an blow it up a little bit well this submission it'll be for the submission so is probably gonna be the ID because it's not going to be the title of the entity form is in the type so I'm assuming it's ID all right so we can add some of the because again we're using standard triple forms we can we can access all of those fields I'm sorry because we're using standard Drupal fields we have access to all those fields in here in views so what did I have I had like food services the name the person signed up with there's something else oh I need the room is there anything else I guess that's it okay so we'll add those fields we can make these links see the name of the person who signed up not sure what that was let's see I think let's just make sure the room thing is set correctly you can make that one the link to so now when we come down here we have like all the information list it out there in the calendar view let me make a couple other let's put this I go to the parent menu item let's put it on the main menu okay so now I can come back here to room calendar and I've got a sign up basically a sign up the whole list of everyone who signed up I can view it by week everything you can normally do with the calendar module you now can do with the submissions and you can also do things like you can if you want to have a again because we have access to all the field data in the normal form we can even create like exposed filters so if we want to be able to filter by room it's super easy you just add the filled room as an exposed filter and right now it's gonna make me type it in which is not what I want to do if I come back over here by the way just this is separate this actually is not specifically the entity form but if you have something like an Indy reference and you want to make it a select box right here instead of this text box if you go under field settings there is check box for it your manage fields if you edit the field down here render views filter is select list you check that box and should oh I'm gonna have to it actually I think cause it ain't oh no I have to select one of these okay duh then it'll work as a select box only a good idea if you if you have a small number because obviously select box can be huge if it's if you've got hundreds of them or something so now if we go back to the calendar we can even filter it out and say okay well show me the stuff in the auditorium now there's nothing in the auditorium because we didn't do any submissions there but we can filter that out and get all that information we can also do because it's irregular cuz it's regular fields and so just to compare this with web form web form has views integration too but it doesn't know a whole lot about the data that's in the field so you don't get necessarily all the formatting options and you definitely cannot do this I think which is because these are complete regular entity reference fields we can even pull in data about the referenced entity so the reference entity for example in the the field room for example we could pull in information about the room they selected like maybe the picture of it and we'll make it a thumbnail because it's gonna be oh woops this is the wrong place right and now we can so we can pull in that data offer the reference sanity as well because we have full access to the user right okay features integration so how many people have tried to capture our web form or features before yeah and how well did it go my never ever end up saying like they're just constantly like overridden even though they work they work but they're constantly overwritten in order to so the features module if your does everyone here know what features modules okay so the features module allows you to take all this configuration that we did like creating these entity form types and stuff it lives in the database and so if you want to push it to your production server you need to export it and sort of import it on the other side the features module allows you to export that configuration as a module which and you can enable over here and you can sort of do it repetitively if you're making changes so in order to make webform work with features you have to install the UUID module which allows you to sort of export a node as configuration to export this content as configuration but entity form is configuration it's already that's what it is already so if you want to make a feature out of that like let's say I wanted to package up this booking system and give it to you so you could run it on your site all we need to do is go in here to structure features and pretty much everything works out of the box so you would create a feature let's say we're going to need food service and room content types we're going to need our room reservation entity form type I think this doesn't work right I don't think I need that and I could probably have permissions related to those but I'll just skip that for now and then I'll need my views so like my room calendar view and those other views I have for the rooms and the food service I could include all those in there and then oh here I need my rules configuration for emailing food services and the room manager give this a name and there we go I've just created a custom module for building like room booking so usually I'll have some short prefix for the site whatever the site is the name of the site I try to get it down to like two or three characters and then I'll prefix everything related to that sometimes I'll use that same thing with an ass after it if it's a feature versus verses that I put totally customized all this for that one yeah so you could take that so it downloaded a module you would unpack it and it's a regular module you could install it just like a typical module and all of these things that those custom those content types that form it wouldn't have the menu links because I didn't export those but that you can't export those in there oh that's true yeah you're right so all that would come out of the box yeah and so well and what's nice is if you're doing this and then you've got you know okay so you launch the site and then you need to do it again you make some change the forum has more fields now or something you can come back here and do this again like check it in to get or whatever push it up to the server and then apply just the changes with features so so that the the production site mimics whatever your dev site is right so the features integration definitely way better with entity form then with platform all right some other things that work out of the box because we're using standard fields we can use the field group field group module so if you've ever used that that allows you to create like groups of fields which can be collapsible so that you can click them open it also allows you to create vertical tabs and horizontal tabs and it also allows for multi-page forms so you can use that module within the form you can use the field validation module that module gives you a lot of advanced validation things like well you can do like red regular expressions with it I'm trying to remember what else you can do with it there's a bunch of different sort of additional you minimum and maximum length of something number of characters and that kind of thing you can do all those sort of things with field validation module gives you more options and when you set up the fields the field permissions module you can limit certain fields to certain users so for example on this if we wanted to create on our entity form we could go in here and create a field like approval and it could be like unapproved proved rejected for options and we could have the default be unapproved and then we could set the field visibility so that only administrators can see this field and if we did that then I don't I don't think I have another user account on here but if we log in with another user and they filled out the form they wouldn't see that approval field but then an administrator who looked at it could see that approval field they could mark it approved and then we could use that in our calendar view so our calendar view could also be filtered to only show approved ones and there's your workflow so if you need to actually have people prove we've already got the notifications going out to people so as long as those people have the ability to approve them then you've got sort of a whole workflow that you could do with it as well so I haven't used it with multi-page forms I know it's supposed to work but I've used it for grouping and accordion kind of stuff but I have not used it on multi-page I don't know if there's another way to do a multi-page form with entity form other than that yeah I've definitely used it on nodes and it's been checked it's on note cards yep okay so the fill permissions module feel collection modules so if you have single fields that are actually two like let's say let's say those feel I'm not gonna do a demo but let's say yeah those food services if you wanted to say you know coffee for 10 people or whatever look you wanted to have both a an integer value and this entity reference but you wanted that as one sort of unit so that you could say like coffee for 10 people donuts for 20 people or something I don't know you could and have those the field collection module allows you to build these compound fields that works within deform conditional fields module so that's this is something that webform has built into it you can say if they select a certain value for this field then show this other form element so you can pop open or close different ones or you know hide different ones based on what people select you can do that within any form by using the conditional fields module which you also work with nodes and everything else yeah okay that's good to know and the big thing is that you've got hundreds of different field types so a webform does have a lot of field types it's probably got like at least 15 or 20 different field types it comes with there are other modules you can get to add different ones to it but again it's webform is its own system it's not doesn't use the same stuff like Drupal cord uses so it's more limited there's hundreds of field types there's like URL lanes computed fields address fields any module that provides a new field type can work with this for the most part I think cool things that work because we're using four entities so I've already shown you views and rules and features other ones will actually still token as well so you can access like all the data values and in rules in emails that get sent by rule etc the flag module if you're not familiar with that allows you to sort of mark certain things is in some way so you could actually use the flag module as a way to approve items to where people could click a link and say market approved the flag module could be used for that organic groups so if you saw my organic group stock then you know that any entity can be a group type or a group content type so you can use that with you can use that within any form as well and I've actually just in the last month and a half or so built a module that makes that actually does this in a more systematic way integrates entity form in organic groups so I'll show you that real quick on this site I have four group nodes so my group type is a node and I have one entity form type called contact us and so what this Oh G entity form module that I've written does is it allows you to to submit entity forms in a group context and then people with group permissions to see the form submissions can see them for only their group so the use case would be like you've got groups maybe social network or something where people and you want to have every group should have like a contact form and but it should go to that whoever leader of the group is so that's what this does and it's the set up is still a little quirky that's what I'm not going to go through the install but it does work once you get it set up the main thing that you have to do to turn it on is under the entity form settings you check that you want this to this entity form to behave as group content and then these same sort of settings which may be familiar to you if you've used rancorous or something else so that's pretty much all you have to do to turn it on and then it will create this forms tab which which you can hide their permissions for who can see the tab and so this will list all of the forms which are available to be submitted in a group context so the idea is that you would probably put some kind of link to this so that people have to click the forms tab but you need a way to get there for setting it up so then you can submit this form in this group context to this one group and then if I go back here under the the group admin interface there's a forums link as well if I look at the submissions here I can see that submission that I just made but if I go back under some other group that I can't see the submissions here and that's all using the standard because again these entity forms are standard entities it's using all the the standard organic groups way to do that there's not a whole lot of magic to it the module basically just sort of auto installs a bunch of stuff but you've got that same kind of groups audience field like you would get if you're using nodes for your group contact all right so summing up when to use entity form when you want to use standard field types and you want to integrate with view views rules or other Drupal modules when you want to easily export the features actually I think earlier in this talk I said oh if it's just to contact us form maybe you don't need to use any form but actually a contact us form is a perfect time to use entity form because it's so easy because it's actually something that should go with the site like configuration to production or whatever so I would use it strictly because of the features integration and then if you want to implement complex notifications very difficult to do those sort of notifications like we did with webform I'm sure you can do it but and there is a conditional emailing thing that's in the webform but it's not as powerful as rules so when you use web for so I'm not saying abandon webform if you want to have a lot of different forms okay so the web entity form you gotta have access to the admin interface in order to create new ones so if you have end-users potentially like a lot of end users who need to create their own forms but you should probably allow them to do you probably should probably use web form for that because you don't want everyone going to the admin interface and you don't necessarily want them to see like all of the forms so if you have a lot of different forms and a lot of different end users that might need to be sandboxed from each other web forms are probably a better choice for that particularly if you don't need some of the other things some of the views and stuff like in the rules it's also really important if you have a form with a lot of fields so the author of entity form says 150 plus I would probably stop for that but like he says if you have a form that has more than 150 fields don't use in any form and the reason is if you ever looked in the database when Drupal when you create a field unlike a node or and it's the same is true for any form there are two tables that get created for every field and when you load like a node it joins those tables in order to get the data so imagine if you had a form that had and 50 fields your sequel statement that it's going to pull from the database is going to have like a hundred and fifty joins in it and the performance is not good so the way the way webform works is different web form has a single table with all of the data in it and so it can just like say give me all the data for this feat but for this form and then it and then it parses it out or formats it as a separate step so web form is definitely a lot better for if you have a lot of fields like a long survey or something web form also has built-in analysis tools so if you're doing a survey and you want to see that like 50 percent of the people who submitted it picked this option and 42 percent picked this option that comes out of the box with webform you could probably do something with views to mimic that with entity form but it's built in there's just a few more things I think I hit the big ones but this node link here will has a full page thing with the whole when to use one versus the other and the advantages and of each alright and that's it questions know we can see I mean yeah it'll still be separate I don't know uses come so yeah so it looks like it looks like there's not I feel certain that this module will be ported to Drupal 8 it's it doesn't look like there's a ton of work happening on it now since the last update to the Drupal 8 version was 2013 but I feel pretty certain that this is going to be available for Drupal 8 in short order and one thing that is some of the some of the field types have been brought in so for example the email field not the link field that I mentioned but the URL field so there are some of field types that are now part of core that you used to have to get a module so those would be brought in and of course you could use those when the Drupal 8 version of entity form is out and also the configuration management so I showed features there's yeah well sort of similar places it but it replaces it for one part of the task the task of going from dev to production like repeatedly there's a built-in configuration management system so the way that entity form works it should be completely compatible with that so that you wouldn't need anything else to in order to to make it work with that yes so that's why I know they're not doing a lot of work on it so they probably did some initial like sort of testing and then probably haven't done anything in a while which is not surprising I'm some of my modules look like that too because they're changing so much in Drupal 8 core that like if you port your modules then you're having to like report them again I've already imported one of the modules like two or three times so I'm not doing it again until until I see a release candidate so that's probably I can imagine that might be in similar situation for the guy who or the people who are doing this oh yeah for sure for sure that's why I'm not doing there's definitely they're definitely still if you look at the list of open issues for Drupal 8 like you're not gonna want to build because I recently redid my personal like site and I was like I was holding out for 8 and that was just like you know I can't wait any longer I need to update this and so and I looked at 8 and I was like when I saw the issues that are open knowing I'm gonna have to update and figure out some way to do that I was like well the other the other premises I think that they don't have any name and they thought there was some discussion about bringing this back but as far as I know there's no beta data upgrade paths so if you have beta 3 there's no you're not guaranteed a upgrade path to like beta 4 etc etc up mm-hmm yeah so this with all that that's why I was like I'm just waiting for a release candidate until I really I mean I've done some preliminary work personally for some of my modules to so I know the general landscape and some of the things that I'm gonna have to learn I've got kind of the basics down I guess I would say but some of the implementation details are still shifting so I don't want to like do a ton particularly well the one I was working on was many badges and the menu system is shifted like at least two or three times so because I think menu items are now entities so that's one thing actually the there's even more things that are entities in Drupal 8 so things like entity reference and stuff should be which you can easily do when you're using any fonda this should make it even more of you should do it much it should be you should have even more power with a module like this so the issue is that you're gonna have to figure out how to um I don't know what that module did exactly because I didn't you ever use it but how how to keep I don't know if it needs to like show when time slots are filled yes so that would probably require you could obviously you could allow people to submit some sort of requests but the ability to show what time spots are filled might be a little bit tricky I guess if you want to do it really simplistically you could create a view and like sort of show and put it in a block and put it on the same page as the form people could like you know look at the ones that are filled and then do it it's just what then when they sign up the fort you know doing some kind of validation is probably gonna require custom code to like just check to see if somebody already signed up for this entity forms not going to give you well maybe could you do with rules oh yeah that would work that would work yeah so there's there's an option I don't have time to go through it all probably but there is an option on an in any reference we we did the simple selector but there is an option where you can say the the available values should be the result of this other view so the question is can you create a view that shows the available values in which but if you can create a view that shows the available values then you could do then you could use this community selection by view option so it might be possible but it might be tricky to show the available values because those are the ones that haven't been actually selected that's that means you're gonna have to have like well I guess you're gonna have to have that anyway so I'm kinda you have to have some kind of time slot entity yeah what you can do you can eat I mean you can do it as a node you can also get the entity construction kit the ec k module it allows you to build entities if you don't want to fill up your content listing with a bunch of different nodes for every timeslot for everything or whatever you could use something like that too but 0:43 you know for example but then you yeah that would probably work yeah yeah yeah that's where yeah because that's that's the other issue is if you have that date selector and then yeah and then you're gonna come down like it's not unless you have some JavaScript like you're gonna be selecting the date at the top and it's not going to know that at the bottom because you haven't submitted to form yet you could definitely do whether if you were willing to let people submit it and then get an error if the slot was filled I'm sure you could do it yeah if they could pick one and it might at which I understand is not necessarily best user interface but if they could pick one and then it would just say oh sorry that one's full which I said you know you could easily put a listing of the ones that have been taken so if you had that tied next to the other one it might not be so bad yeah there's actually I didn't show it but there's oh you can use there is under the rules here there are validation rules I showed only the submission form rules but there's actually a bunch more you can use with the same system here you can do format test rules like who's allowed to view the form you can use rules to determine that and then you can do validation here so you could throw out errors by doing some kind of validation with this as well in the documentation
Info
Channel: DrupalTutor
Views: 8,682
Rating: 5 out of 5
Keywords: Drupal (Software), Entityform
Id: hlpmv3cfngA
Channel Id: undefined
Length: 70min 46sec (4246 seconds)
Published: Tue Apr 28 2015
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.