About Stacks Guru

Stacks Guru is born from the need to search the vast number of videos out there on stacks built for Stacks Pro and the Stacks 5 plugin for Rapidweaver.

We have scraped over 500 videos to get the transcripts for each in order to make the spoken word searchable.

Please use this free tool to help you learn and discover the awesome power that Stacks and the stacks made for Stacks have to offer.

Stacks Guru

Video Reference

Leave a Tip!

Every little bit helps to keep this going. I'll be doing my very best to keep up with the likes of Joe when it comes all the videos he posts!

Grab Bag of Awesome Form Updates 7 More: Email, Foundation, Pi and Feeds thumbnail

Grab Bag of Awesome Form Updates 7 More: Email, Foundation, Pi and Feeds

I’ve recently rolled out several minor updates that combine to deliver some exciting new features for your forms. During today's live stream, I wanted to take the opportunity to highlight and review all the exciting updates we've made. This way, you can discover the fantastic new features available in our toolboxes.

Categories: Live

Transcript

okay everybody we are live how's everyone doing
today hopefully we're doing pretty
good okay another day another stream I have to admit I was this close to to
canceling I got feels like I got so much going on and uh I really love to get a
total CS 3 beta update out this week um I don't know
week's going by really quick David how's it going thank you
sounds good perfect Mr Cole Franco how are you guys doing
today okay excellent Matias is here glad we got your uh feeds set up all
working Ryan thanks for popping in okay so um
you guys I'm sure a lot of you at least I know a lot of you that I see in the chat are uh always active on the
community so you probably seen the flutter of updates that have been coming out um this week and a little bit at the
end of last week right with pi um so I thought it would be fun there's some nice things
that I shipped that maybe aren't necessarily apparent on what all the
cool features are um yeah with what we can do so I thought it would be fun to
look at some of the uh these updates I was hoping to have some pre-made demos by today but man uh crazy day so um
crazy week but uh yeah didn't have a chance to do it so we'll just build some some demos as we go along I have some
existing ones we're not going to do everything from scratch but um yeah I thought there were nice ones to kind of
just show you what this new feature is for pi and feeds and and email Stacks uh
it's been about a almost a year since the last email Stacks update so it was nice A little little update but a nice
Quality of Life Update uh for some people right so um let's go ahead and
share my screen and uh Martin thank you very much I was Martin I was speaking
with um a guy named Mark that you've worked for he's in the Boston Rhode Island area yesterday and um doing
something for him uh helping him out with some stuff and uh yeah he gave you some top-notch reviews apparently he
worked with you on some stuff so good job Martin thank you very much for uh being a part of the community okay
anyway uh let's I was going to share my screen boom and uh what are we doing uh
let's go to the product updates kind of section just kind of remind me what the
heck we're going to be talking about today uh one quick thing actually uh
I'll probably have this in the uh in the next Weaver bites quickly I get this I
don't know periodically right a question how do I style form inputs I'm sorry form input
labels okay and uh yeah pretty simple to do uh let's just go ahead and here I'll
quickly uh this isn't an update but uh yeah I've been getting that question
quite a bit so uh or every now and then so we have form input label let's say I have multiple of them right how how do I
how do I customize that label right so um Insight Styles uh we go to font color
okay and instead of putting in a class we're just going to go to this elements thing I know a lot of people don't know
about this right but if you go into elements and under here there is form
labels right see that element page element form labels and then we can set
that to be whatever we want and if you notice voila there we go super simple
okay um yeah I know a lot of people don't don't move off class very often but go to this elements and there's a a
nice way of styling all kinds of stuff okay in here you can style you know
there's form stuff there's total CS stuff here svgs sliders table stuff uh
menus right uh ways of uh styling certain parts of all menus on your page
right um some good stuff um ordered list bullet lists all images all links all
kinds of cool stuff here so make sure you check out this uh elements thing if you ever want to style like all of one
particular thing right okay um so there we go right that's it that was quick
quick one uh that'll be a good tip that'll go in the next uh Weaver bites email okay
um actually you know now that I'm looking at this is actually a really cool little doohickey here
okay um and why don't I go over this this is kind of a fun
one um I did this for David I think last week um with
davay and we showed it off at the hangout did it at the hangout um and I figured hey this would be a cool little
layout to show you guys so this has nothing to do with the updates today just another cool little fun tip
okay so um I'm going to go ahead and let me let me Chuck a pen on the page really
quick uh so that I can hide these little CSS Builder Stacks so that we don't use them because
they're the solution to our problem all right um so the problem is
um we have two columns now let's Envision something okay let's say I have
okay here we'll we'll do something even better um just to kind of uh I'm going to Chuck in a picture stack just to kind
of give you guys a real uh feel of what we're going to be doing and let's Chuck in a picture
and uh I'm just going to use the same picture for everyone okay we'll use Lady Liberty here okay um and uh under here
let's just we'll put in some a real life thing we have text okay so um let's
preview this you see now I have uh I have a image text image text okay now I
apparently I have Center align let's turn Center align off uh here inherit
there we go okay and uh let's turn on some padding just so we have some stuff
and let's Chuck it all in a container too really quick just so it's doesn't oh I have it in the container nice um let's
tuck it in this container can go
from uh site with plus cutter right there we all right so here I have
um a bunch of layouts and if you're wondering how I generated that with just this uh I use
particle generator okay it's in my SL slot machine stack um super useful okay
allows me to replicate a particular layout many times so let's say this is a Blog okay
and I'm either using uh total CMS version one to do this with feeds or I'm
using um I'm using feeds to generate a layout that I need or I'm using total CMS 3 to generate a layout that I need
okay this is all about creating um some Dynamic layouts now let's say uh in this
particular layout I have a Blog and this is kind of boring right like having image text on every single one what if I
wanted to alternate this so I wanted on this second one I wanted it to be text image and then image text and then text
image then image text and text image so on and so forth okay um how can we do
that so um in this case uh if you I'll show
you a well uh let me go ahead and I'm going to put one of these outside of
this particle generator okay and um so now I have this one ins inside columns
Pro and inside columns Pro if you didn't know uh one of the nice features of columns Pro is that you can change the
order of your columns okay and it's it's a setting that is not
available in the normal column stack and uh there's order so let's say on medium
I want to change the First Column which is this to be two and then I want my
second column to be one right let's see what that means so that means is now on
this one I have now swapped them okay so just to let you know what we're
doing so I know within columns Pro I can do this right I can change the Order of Things
which is awesome so now in theory I know it's possible to to alternate these uh
this layout so how do I do that dynamically because obviously here in order to do that I can't um I can't make
those setting changes here because this is uh dynamically generated content and
if I were to do let's say like I did before I can do medium 2 uh and this is medium one right and if I preview that
it just it just flops everything but I want to alternate it how do I how do I alternate okay so let's go ahead and let
me put everything back to the default really quick um so these ordering things are
just CSS okay and uh as I you saw me hide earlier okay
um this uses a CSS Builder stack um there isn't a swatch for this yet um
could be interesting to have an order Swatch I don't know but um now this is a little bit tricky this the CSS here um
let's let's just show you now that I enable these with pen I turn off the do not publish okay voila okay so with with
those two CSS Builders you'll see that I now have alternating
layout ooh it's cool okay okay so let's explain
what's going on here uh one important thing is um inside
here on columns Pro I have a class called alternate
columns and then inside the column I have column A and this one has column B
okay so custom class column B custom class column A and again columns pro has
custom class alternate columns very important okay so now if we go to CSS
Builder um we need to do uh some fancy CSS here
okay um there isn't way of doing this there's a way of doing similar CSS with
like um the class and optional things if you if you know under here under selector add-on there's like um nth and
even down here nth even nth odd okay um
but I'm not going to dive into all of that essentially just show you uh what we're doing is we're doing alternate
columns nth child even column A okay so what this is saying is um
inside alternate columns okay um cuz in this in here we I
have an alternate column alternate column alternate column alternate column alternate column right there's multiple
of those on the page right now and what I'm doing is with that nth child even
okay I am targeting every other alternate columns columns
Pro okay so right now with that alternate columns nth child even I'm
targeting the second one the fourth one the sixth one so on and so forth okay so
that's where that alternate columns nth child even is now um once I Target that
one right I need to be able to Target The Columns inside of the nth child even
so I need to Target column A and Target column B and to do that essentially you just do
space call- a and space call- b and then inside the CSS Builder we add
in a rule where it is order two on column A and column B has an order of
one and we're done that's it
okay so uh pretty slick little lay out there um yeah you can just do
alternating columns now now if you're using total cms1 with blog um there's a
way there's settings in there to accomplish this right but um yeah it's just kind of fun to show you how we can
do this with feeds or any sort of layout that dynamically generates our layouts
so that we can um do these alternating columns um using Straight CSS pretty
cool okay uh that totally wasn't on my agenda for today but since I opened up
this project file and saw it I thought it would be fun to show you guys okay um and you know what maybe while I'm while
I'm actually here let's just go ahead and um before I forget I'm just going to
open up the foundation um Foundation project file here and
let's just do alternate
columns that way we don't lose this bad boy okay and let's just do
this we're going to go over here we're going to paste that in cool make sure
that that works voila save and I will uh deploy that
later okay cool so now we're not going to have that lost so we're going to be like oh where is that it's in the
foundation 6 demo file okay uh which is available always for download on the foundation product page okay um now
let's get to get back to our regularly scheduled program and let's look at updates here uh product updates let's
just uh we'll go for the oldest to newest why not let's look at Pi okay
um yes I did some cool stuff with pi at the end of last week I think it was on
Friday um with some stuff with mosimo um he had some interesting ideas for um
the Pi show hide stack okay and let's go ahead and show you let's open up the Pi
Project file ah not what I wanted some I love Alfred but sometimes it doesn't do what
I expect it to do okay there we go let me see if there are any
questions um onclick method on text field input possible in pi 2
um I'm not sure Stephen uh with your on I mean we're going to talk about Pi so that kind of um we be playing with pi
show hiide today cool we're going to look at that now onclick method on text input field possible
um yes I mean whenever you click a um an input um Pi should um get triggered so
I'm not sure what you want what you want to do I need more info on that uh St so
all right uh let's look at Pi show hide which is right here
and so one thing I've done okay and actually I I think I have mimo's project
file let me see if I can be all we're we're going to look at
we're going to look at mimo's project file because his is actually actually kind of better I'll be honest his his
his demo is a little bit better than mine I I might steal his idea a little bit and add that to the demo page okay
um so mosimo has a project where um and I think it looks like this could be a
project file uh eventually so sorry mimo if I'm giving away the uh um but he
linked this on the community so okay um in here we're going to go ahead and click on continent and if you click on
state um well actually here I know he did if we did Europe and then Italy
you'll see that it it kind of is this um train of selections right so if I click
on America it shows us America States if I click on Europe it shows Italian
states and if I click on Italy it shows me Italian cities right so there's this
um progression of data now um something that he did okay which the originally
pyo Hyde didn't really support okay um is if you look if we look at the setup
here um so he has a select box called continent where you select America
Europe Asia or Oceana okay um and then he has a piie show hide that if the
continent equals America let's show the American
states okay and if you look at that um oh actually here uh so I think this
is a different example uh and I think a different example here sh let me see oh he did do state one state two all right
um we should be able to now actually make this just State instead of State one and then over here under if we
select continent Europe um let's do state he has State one and state two I'm
just going to make the field name State now okay and then here if uh let's
change this so if State equals Italy okay uh we want to do the City okay now
um I'm going to ignore the rest we'll we'll just here just to keep it simple I'm going to delete those just so
they're not in our way we're just going to deal with America and Europe for right now okay um now prior to this
update um and this update does have this new check boox it says remove from form
on hide okay now prior um with this
update um if if a form field was hidden such as this one right now it was still in the
form and if you clicked on submit here it would actually include all data including the
hidden Fields okay and because the all the form
fields are always there by default um you would need to make sure
that you would have unique field names for each one for example here he had
State one and inside Europe he had state two right it was kind of a requirement before but now because this P show hide
has this removed from formon hide you can actually have the same
Fields uh or I'm sorry different fields with the same name that will get removed
and added to the form dynamically uh with pyo hide so now uh
when I when I choose America uh the state field is going to be the options of the American states
whereas the European option uh it has the field name of state but it's a completely different field that has
different obviously different country names it's not really a state obviously in Europe but you guys get the idea
right okay and same thing for City if we were to go down into America we can actually add a city field as well and
all is okay because um if we let's preview this in the browser
okay and just so we can see [Music]
here all right um I'm just going to go ahead and let's
look at this all right so and there we don't need to see the Styles but we need to increase the size here so we can kind
of show you guys uh so we are looking for here let's find
uh state right um if you look there is no State field
I'm searching for State there is no State field inside the form right now so
if I were to submit this form which probably wouldn't work because it you know a I have to select America okay and
then now that I have America if we find a state again we'll see boom now there's
an import actual field for State okay and if I were to select
Alabama or whatever or if I go to Europe um right now there is a State
field okay uh and if I select Holland there is not a City Field right let's
search for City in here you'll see that there is look there's zero there's zero City Fields but as soon as I clicked on
Italy okay now if I search for a City Field voila look there's now a City
Field oh it says State though but it should should should say City okay there is a City Field right so again these um
this latest update and it is turned off by default again um is this remove from
form field on hide okay quite tricky there's a lot of tricky stuff going on
by dynamically adding and removing form fields from the form um but it's a
pretty cool update because it allows you to uh streamline where you don't have to give every form field a unique name
right um such as here where we have the states for the US and the state for Italy we can utilize the same name uh
because they're going to be displayed on the form at different times based on different answers so pretty cool um
doesn't seem like a big deal maybe to some people but it was pretty cool and there was a lot of very small
intricacies I I had to release to fix some minor inconsistencies several releases to get this kind of nailed down
um actually even had to ship an update to Foundation 6 because um as form Fields were added to
the form um let's say uh this city field was added to the form if it was set to
required um Foundation would know about it because it it needs to re-evaluate the form every time a new field was
added to the form so um I shipped and update the foundation that you know took care of that so now that uh you know
form Fields can be dynamically added and foundation will properly validate the new Fields um as they become available
or if fields are removed it'll it'll do the same thing okay so yeah pretty cool
stuff there um and I think that was that was the big thing with pi um is that uh here
the pie uh the remove from uh hide and again it is off by default if you want that behavior you can turn that on um so
yeah again if you don't turn this on you need to make sure that every field name is unique and also know that when you
submit the form all the form Fields will be available to that submission request
okay so there we go okay
um that was I think that dealt with all the pi updates here let's see Pi see there's another another one from PI uh
this was the foundation update for pi another update for Pi based on some other um things let's see I had to show
hide yep yep okay I think that was it for pi um and yeah this actually update to
Foundation today for another very edge case scenario for Josh um okay but let's
dive into the emails uh update that I did which is actually uh related to Foundation forms okay um so let's bring
up my uh newsletters uh
all right um this is my if you guys are curious this this is a project file that
has every email that I send out right all of these emails that that you've probably gotten from me right I design
all of them inside with my email stacks and they are all here um recently if you didn't notice um
I actually did some design tweaks to uh my emails recently um and I've started
adding rounded Corners to the image um I've actually uh tweaked the fonts being
used Ed some more bold fonts and whatnot so um yeah and if you're curious
actually again something also not really in my plan for today but um I rounded
the image using a Swatch so um not all swatches will work
in email but um something simple like rounding um should work just fine okay
and not all email clients support rounding but um if it doesn't it'll just
show up as a square image right so no harm no foul it'll look nicer in in
email clients that support it and those that don't it will show up as you know square corners so um a very minor thing
um probably something that uh you know eventually when I come to the version two of of email um we'll add some more
uh stuff like that okay um but I was talking
about how uh the update that I did so
um to show you what the update is we're actually going to look at a foundation
form okay and um here I'm just going to I'm going to trash that for now oh we
don't need to trash all of it all let's just do that all
right um let's add in a
form okay and let's add in an email action okay now you might know that
inside of an email we have all kinds of cool things
where we can um integrate data from the form into our
emails okay so for example here if I had a form input with the uh with the field
name of name okay let's just say this one is name okay um essentially by
default this subject will then integrate the name field into the subject of the
email and we do that via the common twig syntax that we're familiar with nowadays
okay where just curly braces the name of the uh the field and then close it with
curly braces okay and you can actually do that in all
the fields here okay so you can do it in the from address the from name the two address the two name um I don't it
doesn't work on the email on failure settings but it does work in the optional
recipients okay um and it doesn't work in the SMTP
server settings I think that would be not a good thing okay um but another
cool thing that it does um is it allows us to um if we use a
custom email template we can also use those values
here okay now this this is very small right um and this does uh support
markdown which is cool we can type in an email in markdown and we can integrate
the data from our form directly into the into the um email using this
curly brace twig syntax okay um there is a special one
that has three curly braces with Fields that's kind of a special macro um it's down here in the tips if you ever forget
it okay um down here okay um and that's
a special one that will basically inject all the fields for you and it'll create like a bullet list okay um now how does
this work with email stacks so inside email I can create an email
and if you didn't know I can um with the inliner of the email Stacks you can copy to clipboard and what you can actually
do is you can take that and and while it's big and a lot of data you can paste
it directly into there and now my custom email uses the email that I built using
my email Stacks pretty cool right and um to even
go farther I'm going to duplicate this so I don't lose this email okay you can even use those curly braces um new let's
say I can do uh you know let's say I did like Hello
name okay you can do stuff like this where at this point uh your curly braces
you're integrating the forms content into your
email right so if I were to you know preview this and then copy this and
paste this into this form okay into this custom email template
setting um the the name from the the form will get integrated into the email
when it gets sent now this isn't a new feature this
feature has been around for years okay um but there are some caveats
here let's say I um integrated in into my form I integrated data into uh a URL
or um an image let's say I had this image URL here and I you know put in um
I don't know maybe something in here like product okay um and I wanted to
integrate that little macro into this image URL okay where oh come on where is it I
shouldn't have gone to the end here right so so here I'm integrating that product maybe it's a product ID or
something like that right I'm integrating the product ID into this image URL or I'm integrating into a link
there are many places um where these curly braces um would get translated
back into like an HTML entity okay it would basically be a percent
7B instead of a curly brace right and this is because this was like a a URL
encoding for you know compatibility and blah blah blah blah blah but in order for um those curly braces to resolve our
form data they have to be a curly brace they can't be percent
7B okay so um what this update does is um if I were to now um you know
preview this and copy this to the clipboard okay um buried inside of this
code here um would actually be for in the in this image URL would actually be the curly brace instead of the what was
happening the percent 7B so um I know a lot of you what you were doing is you were copying this into
like a text document and then you you were doing like a global search and replace you no longer have to do that um
uh yeah this all you have to do now is copy the clipboard and everything should be as you would expect it to be okay um
but I wanted to kind of show off I know a lot of people don't understand that you can actually use the email Stacks um
to build out a beautiful email and then integrate that email into your email
action in a foundation 6 form and then not only that but integrate data from
the form into your beautifully formatted email which is pretty
cool okay maybe I should do like an entire dedicated live stream just for that one day okay I probably done it
already but who cares maybe we'll do it again let me know in the chat if you uh if you think that would be a good thing and actually do I can do like a
full-blown demo and show you everything and show you actually show you working and all that jazz
okay um but anyway uh cool update okay um saves you a lot of time if you were
using that feature and if you didn't know about that feature now you do and now you can use it okay uh another Power
feature is I know you can copy these and if you're using sight lock you can use
these emails inside sight lock as well um I don't know how to integrate data I
don't know if selck has its own templating thing like this um but I know you can use HTML um generated by the
email Stacks with sight lock which is nice another thing you can do is if
you're using um a service such as sendy which is what I use right um I can copy the
clipboard then you can go into sendy right and um
and you can say create new campaign and you can say go to the HTML editor and
paste and switch back and voila there's my email that's how I send all my emails
to you guys right that's the exact workflow that I use whoops hit my mic sorry about
that okay um oh yeah that's enough about the email Stacks um let's just close
this out don't need that right now right um last one uh of the today is feeds
update right and um so there we go I don't see any more questions about uh
will it work in feeds um so yes I won't go over it um Josh did a
video I think it was at last year's Summit that showed how he uses
feeds this is really cool okay here let me just go back to to me um I don't have
a demo of this but he uses feeds to actually dynamically generate an
email from a total sems blog and let's say in his he generates an email um and
the at the bottom of the email it has like our latest three blog posts right
and pretty amazing that you can actually do that um and so if you want more on
that check out the his talk at this I believe it was last year it could have been in 2022 or 20 2023 I don't remember
okay but yeah um I'm pretty sure it was last year his talk was awesome um and he
shows you how you can use feeds to dynamically generate content inside of your
email pretty cool stuff okay um yeah and also in the future we'll make sure we
get total cms3 action as well so that we can dynamically do all that but we're not going to go down that rabbit hole
for right now but yeah check out and while we're talking about the MIT okay summit's coming up April um two months
from now I think it's April um 13th to the 17th oh man let's uh let's
see uh Summit
he April 11th to the 13th okay um yeah
really cool 3-day online course not course um conference all done on Zoom we
uh we'll have at least 15 speakers uh I it's I'm having a lot of
people accepting so a lot of times I'll oh many times I'll overbook the summit with speakers and then there's always
one or two people that drop out um and we end up at 15 so um but so far looks like we're going to have a full crowd so
uh we might actually be going an extra hour uh each day this year we'll see um
but yeah cuz I have a lot of people that want to speak uh which is awesome um I do have a couple open spots still
if you are interested in speaking please let me know uh we're always looking for um new speakers you always everybody has
something to share to the community so um this is a great weekend where we can learn not only just from me um but from
Isaiah other developers and more importantly fellow Weavers okay so um I
have probably more new speakers this year that I've had in a long time which is fun okay and we we have the the uh
The Originals coming up right so Chris is going to talk um Brett Carmichael is
going to be there again Josh is going to be there giving a great talk David is going to be given a talk so a lot of the
the faces that that you see as leaders in the community they're going to be there and speaking um a lot of
developers are going to be there as well um Isaiah's going to be giving at least one talk probably two he's been doing
two talks um mostly and uh we have a commitment to have my goal this year is
to actually have all speakers are going to be using Stacks app by then I know we don't have uh a public beta a new public
beta yet but uh working really hard with Isaiah to make sure that uh we have it so that every speaker um is going to be
doing their talk and showing their demos using Stacks app so um and I'll work
extra hard if you're a speaker I'll work extra hard with you to make sure that uh your uh demos um and everything that
you're going to be showing off uh works well inside Stacks app so so um can't wait for that to happen so um yeah head
to summit. weever dospace book your spot 3 days online you'll get access to not
only all the recordings from this year but all the past recordings from every previous year this is year number
nine of that we've been doing the summit so super excited next year is going to be year number 10 uh big year and I'm
really excited for that um I'm really looking forward to this kind of really
kicking off like the stack Universe going forward right um really New
Beginnings so really looking forward to that and uh yeah check that out we summit. Weavers dospace get your uh get
your ticket $99 um three days and you get access to all the previous stuff uh from previous
years all nine years of talks and we always have some good goodie bags as
well so um a lot of times the goodie bags pay for for your ticket okay to be
honest with you so um yeah pretty much every year the goodie bag pays for your ticket which is which is fun so right
enough with that let's uh jump into the last um update which is feeds
and let me go ahead and open up my feeds project file I was working on that on my laptop
and
where is it darn it all right we'll create we'll
create a new a new page on this actually you know I have another feeds thing I might I might show off if
we have time I'll show off one more feeds thing okay actually it's this right here it's the new new Baby of
feeds coming out um soon um but yeah for now uh let's add in a new
page and we're going to do um get and post okay
and uh we're just going to use foundation for this why not okay and we're going to do this and we're going
to add in a feeds stack
okay and um let's just keep it simple we'll just do like a header
okay um so inside here uh we're going to start off with there are two new feed uh
feeds available in feeds okay we have get URL
data and post request data okay and um let's start off with get URL
data so um let's do something super uh simple and I'm just going to pass in a
um hello
name okay and actually here let's do this um
uh I'm I'm going to get fancy here we're going to use some some fancy twig here and
um all right we're going to do this so um what this is going to do is um if I
pass name to the URL it's going to put a name in there and if I don't pass a name
it's just going to default to fellow Weaver okay and here we'll put an exclamation
point at the end okay so uh let's go ahead and
previous in the browser because it's easier to pass URL parameters from a browser so as you see now it says hello
fellow Weaver okay and if I go ahead and pass uh a name parameter to the
URL you'll see that it now says hello Joe pretty cool right um
yeah pretty slick I see you guys are posting 12 11th
oh oh you guys are commenting on the the uh the summit dates yes 11th through
13th okay um so yeah pretty cool here um yeah pretty slick now you could do this
outside of feeds like but it's like requires like some PHP um you know Echo
statements and whatnot right so um this just makes it pretty simple if I pass a name parameter to the
URL okay I can then um get that data straight from twig pretty cool I like it
okay now what about post what is post data
okay so um a lot of times that is uh coming from a form okay that's the
easiest way to generate post data so let's just go ahead and quickly I'm going to quickly add in uh let's add in
a little bit of okay and um let's add in a form let's do
a text input uh let's just call this um we'll we'll stick with name okay um
name uh label uh name oh that's the placeholder
[Music] Joo okay um and we'll just hide that for now
and then we'll do uh we need a button need a Smit button and our form
action is going to be a post URL action okay now I I think with this I for this
demo my form I'm just going to submit to the same web page but a lot of times what you do is maybe you have a form
page and you submit to a different URL and then that URL then takes that form
data via post data and then integrates it into the web page okay um Josh did a
really cool um kind of form where he you know uh it was kind of like a conf order confirmation page that outputed um and
he was you know used all this post URL stuff kind it's kind of what gave me the idea for this feature uh because he was
using a bunch of PHP Echo statements and this uh solves that for us okay so
now um instead of get we're going to process our post information okay so now instead of the
the get URL uh data I'm going to do Post request data okay and uh I'm going to
keep the same here we're just going to do hello name else default fellow Weaver okay so now we're going to let preview
well let's do it in the browser okay so now I have hello fellow Weaver um and oh
this should say submit but whatever um we can do Joe and I'm going to say submit and voila we'll see that now when
I submitted that form it's it now we are now parsing the um post data okay and so
yeah it's just makes it a little bit easier so you don't have to do all the PHP Echo statements and stuff like that
um we can just access that data super easily using twig and even then we can do these this cool you know twig stuff
like you know providing a default value if one isn't provided is pretty slick
okay um now one thing what if what if you
wanted to supply get data and post data all at the same time okay um
so what I allowed you to do actually with these is I'm going to go ahead and
um I'm going to add get back into here okay and let's preview that okay
now if you see here it says hello Weaver now if I type in Joe remember this form sends it via post data okay um so I'm
going to click that and if you look here it says hello Joe but I I had the get data on there
and if we look at the URL it's not there okay so what does that mean okay um
so the both the get and the post data um
process both get and post data okay however
um basically because in PHP there is get
data which is again supplied via the URL and there is post data which is hidden
from the UR but it's data passed to the web page okay and normally that is done via a
form and I came up with a way of um now you can have get data and post like I
could pass name a name field to this and if I do name equals
Scott right you'll see that boom whoa I have two now okay um actually I uh oh I
think I have an old version installed I fixed that um essentially uh what's
happening now is um what this stack does is it will look
at both get and post data and it will merge it okay um and if there is the
same data oh it works because I have both in here that's why it's doing that
um here let's here if I were to refresh this now there we go all right there's only one um so get data will look at the
uh post and get data but if there's duplicates where post has a name field
and get has a name field get wins okay so get takes priority but when you're
using the post data okay um and there's both let's say a name parameter for
um there is a name parameter for the get data and the post data with this one the post data wins okay so it's a way where
we can still access all the data but one wins where the other one doesn't okay
just to let you know kind of how all that works um I thought that was a nice workaround to be able to access both
sets of data at the same time um but obviously if we're if we want to take
priority of post data that that data is going to win over the get data okay um so anyway there we go um I know this is
definitely probably a more advanced topic um and you're probably wondering how the heck I'm going to use this
um and yeah a lot of a lot of it is you know uh especially with post if
you're submitting a form um and then you know submitting that data and displaying
that on the web page um you know as some sort of confirmation um and maybe you can like print that using the print
Stacks okay wink wink with Josh's new signature stack wink wink which is
pretty cool check it out um he's releasing it Friday be on the lookout if you want a sneak peek you can go over to
I I gotta show I got to show it off a little bit it's pretty cool the stack
we.com sorry Josh I'm spoiling your your your oh wait it's not even here what I
thought it was on his homepage he's trolling me I thought it was on oh here it is see check out Signature Pro pretty
cool little doad voila you can sign stuff you can undo uh don't don't do or
orange signatures or or blue signature Fields though I don't know keep keep it plain either do you know do do black or
white pretty cool I like it and what's slick is like um it transmits this um
via creates a PNG of the signature um he did a a superb job um so good job on
this I love it um yeah check it out if you need signatures in a form um yeah
this the bee's knees check that out um it's going to be official released on Friday Friday um but obviously it looks
like you can buy it now so go bug Josh um it's good stuff
okay um oh I promised if we have time I noticed we have eight minutes left
okay um there is a there's a new stack coming
um called feeds API now what what is the purpose of this
um if you are familiar I did I think it was last month um I did a live stream
building out this particular form where um it looked up uh UK
postcodes right and it queried an AP an online API and we kind of built this
cool little thing right and it got me thinking like um
this is this was a really cool demo and
uh I up I created Pi 2 and actually made it easier using pi 2 that was kind of uh
it was actually one of the motivations for pi 2 was was this cool live stream that we did but I thought we could go a little
bit farther and I was like well what if someone wants to do something like this but there isn't this cool online API
that lets us query for whatever in this case let's say there wasn't a UK
postcodes um API that was available for free out in the
world what what what would what could we do like how could I make that a
possibility and so it got me thinking like okay well we we already have
feeds and feeds allows us to have many different data sources right we could
have we can populate it from a a CSV file um Json files from databases from
YouTube and Vimeo all the way to total CMS right um so feeds has a lot of
really cool stuff where where we can store data all lots of any type of data
you want okay but then how can we create an AP instead of displaying that data to
a web page I want to generate an API from this thing like I want to make it
available to anybody pretty cool right so that's exactly what this does
so feeds API has access to all of the feeds data um Imports okay and here in
this example here I'm just using um some CSV files okay they're actually not even
files they're just stored in here um they're I just copy those from the CSV uh demo right here okay um but what this
does is instead of creating a web page it creates an API right so as you see
here when I preview this instead of generating a web page it generates an API for us with the
data okay so now we can then use use our own API to maybe generate some cool
whizbang you know integration that we could do with our forms or whatever maybe maybe you wanted to offer an API
to your customers to access data right um pretty cool now there there's some
things I still need to add to this like some API keys and stuff like that um so
we'll definitely add that so but by the end of the month I hope to have this officially released um and it's really
cool and you can also do filtering so like let's say um you know I wanted to query the API for um well I don't I
haven't added any queries in here but let's say I do Dynamic URL filter um uh contains and I want to
filter by title okay cuz I think I'm using the title field okay so let's say
um in here I want a query for um title
tle um equals paint okay and voila you'll notice that
I'm I my query now resulted in whoops uh resulted in only this particular query
right it only resulted in that one item so we can then do kind of API queries as
well on the Fly um for those of you join the hangout you'll know that I you'll notice that I fixed that because I
demoed this last Friday and filtering wasn't working so it's working now which is cool okay um so yeah pretty slick I
think if I did uh golden was another one so there's Golden Gate Bridge right so
we can do some really cool filtering um based on the data and then only return the data that we need right
um I'm really excited about this I think this is going to be really cool um it's definitely I understand 100% And Edge
case thing this isn't going to be a mass Market thing um I know that it's it's probably for definitely the more
advanced users someone that wants I think it's not hard to use um but I think having a use for it is definitely
um on the Advan side you know so if you're creating if you want to create some sort of cool form like this there
isn't available apis out there we now know that you can actually create your own if you need it um if you're if you
want to give again access to your customer API or give your customers access to an API um you can do that too
so um yeah I'm excited about it I think it's going to be uh a very useful stack
for those that need it and um there we go it it'll be a new piie uh a new feeds
add-on coming by the end of this month okay pretty cool stuff okay
um that's that everybody that's all I had for today um some cool updates hope
you enjoy enjoyed hope you learned a little bit of cool new stuff about uh piie with email and uh and feeds today
so take care uh hope you guys to see you on Friday at the Hangouts um and go get
your summit ticket it's coming up two months from now um April 11th to the 13th as Scott Williams says it is the
best kept secret in the or the best add-on in the community he said that's what he said he called the some the best
add-on in the entire Community which uh I appreciate that so um thank you very
much everybody have a great rest of you
Search the page
0