0:00
someone could come on cuz it's uh it is all you sounds good I
0:06
uhet oh we are we are live now by the way
0:13
so excellent I normally I thought it would like prompt me you ready to go live after you configure but no it just
0:19
does it sweet all right hey everybody in the chat what's happening what's cooking
0:27
hope everyone's doing well today let's see anyone in the chat
0:32
wonder if it's because we started oh I gotta go this one excellent David's here Mr Francis Dr
0:41
Bob all The Usual Suspects Adrien Gunter thanks for coming on Ryan good old
0:48
Ryan's here hey Ryan good job on uh winning uh winning the raffle I don't hopefully you saw my message you won uh
0:55
you won something hopefully Mike's going to get back to you on what you won
1:00
Lewis is here gastone is here sweet it's a
1:05
party so uh good everyone you you know you know this mfer I almost I almost was
1:13
a bad boy and said bad stuff I can't hear you all of a sudden
1:19
dude sorry I just muted myself for a second sorry wait so yeah you you all you guys know that you all know this guy
1:27
this wonderful individual he uh yeah I I thought I'd bring him on today so you
1:32
know there's been a lot of um you know a few over the past few weeks uh some
1:37
interesting talks and desires for some multi-step forms and I know I've done a
1:43
pretty extensive live stream on multi-step and multi-page forms before so I'm not going to go over the all the
1:50
like the how to set it up and the the intricacies of it um in terms of the foundation multi-step forms um I'm just
1:57
going to go over some other cool ideas that I've seen come up um and kind of build on top of that and another thing
2:04
is I don't think we've talked about F6 brancher on the live stream before so um I brought Josh on he's used it I think I
2:11
think you've built like Scott said like this immense huge brancher um form right so so yeah I I
2:19
knew that so I was like hey Josh you available and uh yeah he squeezed Us in also why I had to start 30 minutes early
2:26
today but it's all good um yeah so yeah I thought we'd kick it off with
2:32
Josh showing F6 brancher um and actually if if you want he's also working on some uh some other
2:39
label stuff we we can help you debug that stuff live too if you want dude um with the data
2:45
set yeah that you want you want to jump into F6 Branch or you want you want to you want to look data sets uh we can do
2:52
the data sets in a little bit well first qu this just in case I get pressed for time here sweet all righty so I'm just
2:59
going to give a show kind of a demo form here now when you're doing something
3:05
when you're like brancher and you're doing a multi-step form I always find it's easier to lay it out see what are
3:11
you going to do um have all your options have all your steps um in this case
3:17
you'll see here that I've kind of just said you know I want a form that says what is your name and then what version of total cms3 are you buying and then it
3:24
kind of gives you the option for light standard or Pro and then this will push you to step two three or four so I
3:30
figured this simple little demo will give you that basic understanding of how do we do this uh all right so let's just
3:38
jump right on in to Stacks all right so I'm just going to throw up a site Styles now because I am
3:46
running PHP 8 I am just going to throw in a jQuery Legacy
3:53
support all right and throw in here a
3:58
container adding on that and then we'll jump in with a
4:08
form perfect and now I like to organize my steps uh with pen just so it's easy
4:14
to collapse so I'm just going to set that up
4:27
here I'm just going to call that Step Zero Perfect all right so let's grab the
4:33
branch or stack and throw it up on the screen so there's some settings in here
4:38
um that you kind of have to go through and set up that you do per step and uh what you would be looking at
4:45
here is what is this step called so this will be called Step oh sorry my auto save is going to
4:53
kick in a whole bunch of times here um let me just kick this to save
4:58
something there you go all right so we'll call this Step
5:05
Zero and then it's going to ask you what is this step targeting so right now we don't have a field in here so let's get
5:12
ourselves a field in
5:18
here we're just going to put a text
5:23
input and we're going to call this name and put a placeholder of name and
5:31
then I'm just going to put a text field in there that says hey what is your
5:37
name now there is a really cool thing I'm just going to sideline here that comes with uh that comes with brancher
5:44
and it is called a brancher macro I'm just going to throw that underneath there and in brancher macro we're going
5:52
to Target the name field and we're just going to name this name Mr for name
5:58
macro and say class is uh I'm just going to
6:04
put uh yeah I'll just put my name in here class Joshua so what this macro uh
6:09
stack that comes with brancher does is it will collect the name input and allows you to use that later on in your
6:16
steps so if you want to personalize your forms um by pulling data from one step
6:22
and using them in the next step this macro is a little a little uh a little stack that it's included with brancher
6:27
that allows you to do that all right so now if we go back into the
6:34
step we're going to say we want to Target the name field and then for logic um we don't
6:41
want it to be empty um so what you can actually do is a less than zero because
6:47
anything you put into the field will be less than um will trigger that it won't let you
6:53
change the step if it's empty but if you put something in then it's not less than zero and then we want to go to step two
7:00
or sorry step one because we're on Step Zero and then the default goto steps so
7:06
if nothing happens what is the default thing that happens so if you wanted it to go to another step if you didn't put
7:12
anything in you could do that but in this case I want to keep them on this step and not go anywhere so right now
7:19
we've decided that hey this is Step Zero we're looking for the name field we have a logic that if it's less than zero you
7:26
can't move otherwise you can go to Step One otherwise you stay on Step Zero and then
7:33
you just need to add in a button and let's just grab a button
7:41
here don't have enough buttons uh now on this button we're just going
7:48
to say next and then we've got to add a custom
7:54
attribute and in here we just say ID
8:00
and then we have to say that this step is complete so we say Step
8:06
Zero complete awesome so now we have set up
8:11
our first step we can see it probably look a little not so pretty but we're good to go so now we get up a another
8:18
step so I'm just going to quickly duplicate this out call this step
8:26
one rename this step step one we're going to remove the name and we'll deal
8:33
with the rest of the setup in a moment once we put some more stuff in here so what I'm going to do here is I'm
8:40
going to replace this header with the hello and then the macro that we pulled
8:45
off here from the uh the F6 brancher macro we're going to say hello name Mr
8:51
what version of total CMS are you buying and then we're just going to put
8:57
in some radios [Music]
9:12
so we're going to put three radios in and we want all three of these radios to be just field name of
9:21
TCMS version and then the first one we're
9:27
just going to say is light
9:35
second we say
9:44
standard and then the last one we'll do pro well auto save and
9:58
partial all right so we've got three options
10:04
here um and we know that we now we're calling this field name total CMS version so now we're going to go back to
10:10
the step settings and we're going to say okay we're targeting the field name of
10:15
TCMS version and instead of logic there's a Case Logic and this allows you
10:21
to put in essentially a yaml um field set of options so we're going to say
10:28
here that if it is light we want to go to
10:34
step two then comma if it is
10:42
standard we go to step three and then if it's
10:50
Pro step four perfect and then our default uh
10:57
goto is step one because that's what we're on right now all righty and next we'll have this
11:05
as step one complete all right so let's just test this out so far so we have a
11:12
step zero and a step one see how we do so I'm going to say
11:18
your name I'm going to put Joshua perfect and then we says hello
11:23
Joshua what version of total CMS are you buying and then you can choose your version but we don't have the next steps done yet
11:30
so let's get those next steps
11:39
done so I'll do this one probably a little quicker so we'll just go step
11:45
two hey Josh after this can you send me this project file and B I'll combine the project files that we make today and
11:51
give it out cool now what we're going to do here is um we're going to do for the button
11:57
instead of it going next we're we're just going to do a back button instead so we're going to say
12:03
back and to go back a step whatever step you're on so this is going to be step two we're going to go step two
12:13
back so now let's rename this um I'm not going to put anything for logic other
12:19
than just telling this this is step two and then I'm just going to
12:27
delete then I'm just going to to delete any of these options in here just leave them blank for a
12:41
sec perfect so in here I'm just going to put step two is the
12:49
title and say buying
12:57
light perfect so our step two should be done so we can press that we're just
13:03
going to put in a blank here and say if we set light we should get to step two and if we hit back we should get back
13:09
here perfect so we have that step working so now let's get standard and progue
13:14
working so I'm just going to duplicate these twice more this is my step
13:22
three we're going to rename this step three and the back button step step
13:32
three then rename the
13:42
title perfect and then let's do step
13:49
four this step is now step four rename the
13:58
title and go buying Pro and then for the button we do the same thing and we do
14:03
step four back perfect so let's do a little test here so my name is Joshua and let's see
14:12
go next actually now before I do that let's go back for a sec you see here now if I leave this blank and I click
14:17
nothing happens that's what that less than zero logic was doing so it's preventing the next step unless you
14:24
actually put something in so here I can put Joshua now we're on to this next step
14:30
here now I could have put the button in a container so it wouldn't sit up there but let's see light should go to step
14:37
two perfect let's go back standard should go to step
14:43
three and pro should go to step four nice very cool love it yeah so that's a
14:50
very simple look at at at doing this and it's I always say like the form that I had kind of put out there um I can kind
14:57
of give an example I think I have just a quick preview of that um now
15:06
this is where you can take the these forms to a whole another level um if we looked at at these settings here with
15:13
the radio I've actually replaced the radio with SVG images MH and with the
15:19
radios here I've actually converted them into select boxes so what you can do this is again just using swatches
15:25
brancher and F6 form you could end up with something like this like what kind of vehicle do you want and you can
15:31
select and your actual SVG will change color just to let you know everyone I do have a temp a template that does that
15:37
for you that shows you how to do that so there's there's a template in the free template pack that will show you how to change the svgs for radios and just so
15:45
you know that is the template I [Laughter] used yeah and so then here you know what
15:52
is your budget so these are all radios that have been styled with swatches to give you this look sexy I like that and
16:00
so I think it's it really makes a form look completely different yeah um with
16:06
that and then you know your back works so it's it's pretty cool um
16:12
brancher is awesome stack um and I think that it's super customizable to what you need um highly recommend
16:20
it sweet that was cool dude you I'll I'll be honest I I I love that simple
16:26
Simplicity of the brancher I think uh you know you it can get pretty large
16:33
right because then you can you know have steps you know if step four is then something then you can go off onto all
16:38
you know yeah some you know I think I think if you're going to build a complex form something that is going to be
16:44
important is to create like maybe like some sort of Mind map or something that is like an outline of your form and its
16:51
steps you know what I mean um yeah no the the Mind map that I I made for the
16:58
the car one that I was doing um yeah is is quite extensive it is I mean it's got
17:04
I think about 35 steps and it branches up to four different ways um and then it
17:10
comes back it's really cool is you can bring them all back in at the end with some final questions that are all the
17:15
same no matter how you branched off you can you can Branch out and Branch them back in which is really cool nice very
17:23
cool very cool I like that uh uh it's been great trying to okay
17:29
people are just saying thanks they'd love to have the project file so yeah send me that that total CS that simpler one that you did and and I'll I'll merge
17:35
it in everyone says Josh you make something
17:41
very complicated look so easy to do yeah sorry I just I know I kind of went
17:46
through pry time I know I went through that a little quick but it's it's it is
17:51
a little bit of playing around um uh to kind of figure it out but it is it is
17:58
pretty it's it's pretty awesome like it's it's powerful sweet I love it why don't we uh
18:04
because I I know you're press you're limited on time why don't we uh address some that data set thing for right now
18:10
we can we can chat on that before I diverge off into I have no idea where I'm going so sure
18:17
um let me open that project then we can work within that so I'm actually doing something
18:23
pretty crazy with uh with feeds um
18:29
um let me just reshare my screen here if Raphael's in the chat hello
18:37
[Laughter] Raphael so this is actually very interesting so
18:43
we have a total um we have a foundation 6 form input that I am supplying a data
18:51
set so I need to supply data to the data set so it is a text entering
18:57
field but instead of listing the data set I'm actually using feeds to supply the data set um and then what that's
19:04
doing is it's pulling from uh mySQL database so the whole thought process
19:09
would be that where you enter the client name then You' be able to
19:15
search a client name selected but because it's a text
19:20
input the ID needs to be in there in order for that to submit into the form but I would like to display the the
19:28
selected option name but still have the ID submit into the
19:34
form okay so by default the select option only does a value yes so I did a
19:41
little HTML hack here where I added in um I did HTML so the value was in the
19:48
was ID and then I was able to put a name in there which allows um the name to actually show up and which it actually
19:54
works in the data set it actually works oh it shows a little oh that's ID and
19:59
the name so it does both and it's searchable you can actually search the name but when I select the option it
20:06
puts the ID in okay yeah so now I find in this particular
20:13
use case you want someone to be able to type something in as well yeah well in
20:19
this case there's a possibility there's going to be 500 people in this list so I
20:25
need to be able toil by that instead of a select box well the select box isn't
20:34
searchable that's the problem all right but with this solution um someone can
20:40
type and type in yeah so and and actually cool is that we're searching
20:45
the actual name like when I type in the name it's actually pulling that name and using the value so it works I can use
20:52
this interesting here try this really quick go back flip back to edit mode um
20:58
okay add a select um a select uh form
21:03
stack to the page just for now select um like a select box yeah select
21:10
box okay just add in wait um add in an option in
21:15
there just select option yeah all uh drag that select option and replace your
21:21
HTML I think that will
21:27
Hur obviously to put in your your Macros yeah
21:37
yeah capital N
21:52
yeah oh I spelled my macro wrong hold on iy print
22:04
boom there you go but it's the same thing when you select it the value goes in I just want
22:10
to see if that would work cool um that's interesting I can actually I'll actually
22:15
add that as an option to data set maybe um okay next up is on that
22:23
input uh on the where's the input not the data set
22:29
but not the data list but the input the text input you can delete that select box too
22:35
don't need that anymore get that out of the way um you don't need the HTML but
22:40
it doesn't matter on that text input try to set it to
22:48
disabled or read only let's try try one one or the other oh for read
22:56
only can you can you select I can select but I can't type
23:03
yes at that point it's a select box oh but then you can't type because you want
23:09
to be able to search yeah correct so I want to be able to search the data in that data set yeah I was just trying to
23:15
think of a of a kind of a hack to allow someone to search but not type in but if you yeah if you disable typing then
23:22
defeats a purpose shoot
23:33
yeah I don't know so so what are you going to do with your form how are you going to stop someone from typing in
23:39
something and submitting incorrect data well the form
23:44
is being used by an admin so this is this is behind a password so it's it's the actual user trusted User it's a
23:51
trusted user so that's not a problem it's just trying to make it that after they selected the the name instead of it
23:58
showing an ID it would just show their name um I mean that's so minimal I mean I think I can get around it with a
24:04
little bit of uh JavaScript wizardy um and a hidden field where I
24:11
could display in that field what was selected and then hide the value in a separate field and then submit that
24:17
separate field into the form but um trying to make it as as as simple as
24:26
possible you know I mean if you you can type in with a select field I it doesn't
24:32
have a text field that you type but you do know if you have a select field you can type and it will automatically filter that it'll take you to that
24:39
particular area um H interesting um in terms of getting the
24:46
the values and labels I wonder if Pi could could help out here I don't know
24:54
okay interesting idea yeah I thought that was pretty cool being able to pull in a whole list of users off of you know
25:02
mySQL database with feeds I thought that was pretty cool oh yeah totally yeah very interesting and I like that how we
25:09
can add that I didn't know that a datalist supported op labels and values
25:14
which is cool so I'll probably add that as an option to the datalist stack so
25:20
you can add that same just it'll just add in the placeholder from select yeah same exact HTML soet ex like that yeah I
25:28
thought that was a really cool shout on that I like that um
25:34
okay my turn Let's uh this could actually be fun having someone else on
25:39
here to kind of oh before you before you go into that do you want me to show the feed select option I know mine's a
25:45
little hacked but that's an ID thing that you can do to using um total CMS to modify a
25:51
form sure yeah I have a quick little uh let me just pull that pull that up
25:59
up it's just that one thing that you need to do for me with the radio fields and the checkboxes but in theory this
26:08
will work if I can find my sandbox there you
26:15
go so someone as part of this multi-step Forum someone also had asked about the possibility of being able
26:22
to um use total CMS to change the options on a form um and this is
26:29
actually something I had built um a while ago and but it's requires just a slight
26:38
modification of the checkbox and radio fields in total or in
26:45
Foundation 6 forms so here's a quick example this is
26:50
a foundation 6 form with uh checkboxes and it's saying what services
26:57
do you require Quire so if we actually go into this admin area we'll see here that I have a
27:04
total CMS blog and I want to remove um remove stamps as an option um
27:14
and maybe let's remove web store but let's add uh e-commerce so this one
27:21
we're going to call this uh
27:27
Ecommerce
27:32
value is yes off value is no and go
27:41
save so we go back to the form we'll see here now we have got a Blog calendar
27:47
e-commerce and total cms3 license so very simple way of of modifying now this
27:54
is going to modify a single question on the form so if you had like a whole
28:00
bunch of questions you're going to create multiple blog or other blog lists or you're going to create some
28:07
categories inside of a single blog so that you can filter out which question that you would want those options for so
28:14
it's a little and if it's not the same type of checkbox then you would need a different form so in this case you
28:19
almost need a Blog per question to be able to modify those options in a way
28:25
that you would want to and how this uh how this well wonder if so what if you were to like I mean I think the cleanest
28:32
ways to have separate blogs but you could like tag them or categorize them if you wanted to but if the values that
28:38
you need to fill in are different yes then you have to have a different form corre okay yeah yeah that's your
28:45
only problem is if it's not if it's not all checkboxes then you need a different for like a different option like if you
28:52
had different um if you needed radios or something then that would be yeah you would need to set up your form different
28:58
so as long as it's the same type of data you're filling in sure I can see that
29:03
now for this but it is just a key value pair right it's just a label and a value
29:09
label value and I'm actually setting the name of the fields oh I missed that oh I missed that part yeah so in the actual
29:16
form what I'm actually doing is I'm setting the field name the label value
29:21
on got forx got it so how this is working uh now this is just a modified
29:29
checkbox just because um we have to get around an ID issue with uh Foundation 6
29:34
forms um so what I've done in the form here is I've added a feeds and it's a total CMS feed and then I have a
29:43
checkbox where I'm filling in um I put in the macros that actually comes in
29:49
from Total CMS so the field name is the title label is Media uh value is genre
29:55
off value is author Dynamic ID and this is the peral link so that Dynamic ID is
30:01
the thing that I need added into a checkbox as maybe an option and if the
30:06
radio as an option if this was an option that added Dynamic ID you could leave the existing one the way it is and add a
30:12
dynamic ID which is allows me to throw in a macro in there that would solve the problem with the current ones so this is
30:19
a this is just a modified one that I made and that's it um it's just a checkbox with these options tied to
30:26
Total CMS and that allows me to now have a form that is dynamically
30:31
changed straight from uh total CMS
30:38
nice nice I like it so you want to add a new Option boom done score no need to
30:45
open up the rav project I like it very cool right
30:55
um all right so uh problem I'm trying to solve or or the
31:01
problem I'm going to I haven't done this by the way um so uh let's uh I'm going
31:07
show you the the problem that we're going to attempt to play with um let's
31:12
see it was Phillip had a should have had this post pre-loaded
31:18
let me find it really quick oh it's not new it's let me go to
31:24
sort updated all right here I think you responded to
31:30
my there it is all right so um Philip
31:35
here has a multi-step form okay and uh we we recommended brancher I think
31:41
brancher is fantastic okay um and then he actually had an idea of you know
31:48
using agent if now I took his idea and kind of ran with it I don't think he really understood what he was saying
31:54
here potentially Philip no offense but um and uh but that got that gave me a clever idea of how we could potentially
32:01
use agent with multi-page forms i' say
32:06
this is going to be for multi-page not necessarily multi-step okay um so
32:11
there'll be multi-page forms and then at the end another thing that I want to do I'm not g even going to try this find
32:17
this post because I think it was like a month ago um Mr Jones Steve Jones um had
32:22
an idea on on like having a final step in a form and displaying that information using P um to kind of like
32:30
verify the information right so I thought that would have been cool so um yeah let's go ahead and uh and see if we
32:37
can get all this done let's play with it all right so I I started this off while
32:42
Josh was talking right now um just so we had something here okay and um uh
32:49
actually I should have done this work in preview I think it'll work in preview okay so we can go to step two
32:56
oh oh oh hold on okay uh first off we're going to we're going to go to URL step
33:01
two all right so um I just have a basic form here on form step one it's just
33:07
name email a Smit button that says go to step two and then the action here is a
33:14
get URL action okay and it's going to go to slash
33:19
two okay actually you should go to SL2 slash okay um I could put the full URL
33:25
but it that this should work as well okay um so let's go ahead and preview
33:31
this I'm going to fill in um Joe right email we're going to go to
33:38
step two and this goes to step two um and if we look it has all the
33:45
information in the URL bar score okay so I haven't built step two yet right um so
33:51
here's step two um I guess I should have explained what's going on right
33:56
here um so I fill out this form this is step one right and then um I put in my email
34:04
address okay yeah okay um and then I say go to
34:09
step two now what a get um a get URL or
34:15
a get action is okay is it takes us to that page and what it does is it takes
34:20
all the those form parameters and passes them to the URL okay um Arc does UR L
34:27
paramet is a little bit different like you can't see them in the browser bar it shows you in this little window so um
34:33
this is the browser bar okay it's just the way Arc does it if you remember I'm testing out Arc The Arc browser but
34:39
basically what do it's going to step two and it's taking um those fields the name equals Joe and email equals and then the
34:47
email address that I added to it okay so hopefully that makes
34:54
sense okay um so again it it goes here it goes through each field this is the
35:00
form field name and the form field email and what this does is it takes the
35:07
data and it passes it to the URL of the page of the URL that I configured here
35:13
okay so now what we're going to do is we need to then continue this form okay now
35:18
um but what I want to do is I want to make sure I I store the information from step one
35:25
so what I'm going to do is I'm going to quickly add in some hidden Fields okay and I'm going to make this
35:31
field name okay and
35:38
uh and then hidden field we're going to be email okay the field value actually we're just going to make it blank the
35:44
default value is blank okay and what's going to happen is um Foundation if if
35:49
it sees you pass a parameter to um the URL it's going to automatically populate
35:56
these form fields as if these fields were also populated on the inside this
36:01
form okay so what we're going to do now is I'm just going to add in one more um
36:07
and we're just going to add in I don't know a comments or something like that
36:19
okay okay do
36:26
comments lock okay whatever all right so now I have a comments field and now we
36:32
need to um now what you could do is you could have a Smit button in here I'm actually going to go we're going to go
36:39
one more step for fun okay so we're going to go one more step we're going to get the button stacked we're going to
36:45
get the Smit button uh we're going to say um go to final step okay we're going
36:53
to do another get action and actually I'm going to add in one more page page
36:58
um actually we're going going to duplicate that just to save us a little bit of
37:05
time this and say final step okay and in the final
37:16
step um we're going to say
37:22
submit okay and then instead of that we're going to at this point your submit would probably be an email action or
37:27
something like that your your final action you're not going to do any more get you're going to email okay um so
37:34
instead of this our final one we're going to get in all data we're going to get in uh
37:41
comments right so the final step and then what we'll do is um after we kind
37:47
of get this working I I'm going to use pi to display like a summary of that
37:52
information and then we can submit it okay um okay so this one oh let's change this
38:00
page name to be um slst step three okay and so inside here uh this
38:08
get URL action um I want it to be um slash step three
38:21
okay save that preview it all right so now I am in I'm in Step One
38:28
one we're going to do uh Joe an email we're going to go go to
38:34
step two um hello there we're going to go to the
38:39
final step right now if you look let's look at the URL for this right we look at the URL in step three you'll notice
38:46
that it it continued name equals Joe email equals the email address and com
38:53
oops I forgot it should be comments not comment a comment equals and then whatever I typed okay so cool
39:00
everything's passing all all the way to step three okay um so we have that
39:05
working now I'm going to back up because if you remember Philips post we talked about agent okay and um what if our
39:14
multi-step form we wanted to do different um Things based on the data
39:20
from previous steps okay from previous form pages okay
39:27
now brancher makes that easy um if you're doing like inside brancher right
39:32
um it's definitely simpler um and it has a lot of really cool logic um but I
39:38
figured it this would kind of be interesting to look at so uh first off let me make this comments instead of
39:43
comment a perfect right so um what I do is let's
39:48
look at agent okay and actually uh you know another
39:56
tool that could do what I'm about to do right now is actually Josh's URL query
40:01
mixer right um so um we're going to look at two different agent Stacks um we're
40:08
going to look at agent URL okay and what you can do is because all those
40:13
parameters are passed to the URL okay you can query for them right so
40:19
if I look at a name is equal to Joe okay
40:25
so if the name equals Joe in step two to then I can I don't know put something else like you can either have completely
40:31
different form fields or there's all kinds of stuff you can do um like you know you can have different form fields
40:37
in here you can actually change the complete layout if you want you can do all kinds of stuff at this point um so
40:43
whatever you show inside this agent URL stack is only going to be displayed if
40:49
the the value of the name field from step one was Joe does that make
40:55
sense right um if you got any ideas please feel free to inject
41:01
Josh um so okay so let's just let's just put in a header stack in here right just
41:08
for fun again you could put in completely different form fields in here like if it's Joe I want to put in an
41:15
extra five Fields right or in Joshua's car example maybe if you choose an Su
41:20
SUV you get to choose Tire options right or something like that you know right so
41:26
so at that point you can completely change your form based on what you know what was chosen before okay um I'm just
41:34
going to say hello Joe here okay right so let's test this out just
41:41
for fun I'm go over here and um we're going to go um Joe and type in an email
41:50
and we're going to say go to step two now up here it says hello Joe because I
41:55
put in Joe in that field right right but just for fun let's go ahead and and change that we're going to put
42:03
Josh and an email okay and go Bop hello Joe isn't here
42:11
right so just to show you how you can now use that um you know this feature this multi-page feature uh in forms and
42:19
agent together okay again you can also use Josh URL query mixer okay um pretty
42:26
sweet I like this I think I think this is going to be a super really cool thing okay um again
42:34
I'm not going to go into a full-blown example I just proven that it definitely works right here and just for fun here
42:40
let's go ahead and um I'll add in a different text area Okay um let's just
42:45
call this one about Joe okay just for
42:52
fun just to show you okay so now let's go back to so when when the name is Joe
43:00
we're going to have an extra form field here called about Joe okay we're going to go in here we're going to
43:07
preview I'm going to type in Joe since we want to trigger that that logic in field two in step two okay uh we're
43:15
going to go to step two now I have an about Joe right so we can go um about
43:21
Joe here okay more comments right and I'm going to say go to final step now if
43:28
we look at the URL here okay we'll see that I have step three name equals
43:34
Joe um email okay and then I also have the about Joe field and that contents
43:42
okay in the URL okay here actually let's go ahead and uh let's look at
43:49
this here this is probably a little bit nicer to look at
43:55
right so if we look at this URL okay we have the name field okay we have the
44:01
email field we have the about Joe field and we have the comments field right so all the
44:09
fields from all the previous steps including this one that's about Joe that only gets added if name equals
44:16
Joe right so pretty interesting um I'm liking it I think I think this is a very
44:22
powerful thing uh that we could use for something in the future I think it's a powerful tool to have in our
44:29
toolbox um now another thing I mentioned is Agent if right so agent URL uh it it
44:37
does check URL parameters or post parameters you can also check whether or not the URL parameter is present or not
44:43
right so um you can say like if name exists or if name doesn't exist right so
44:50
um in this case if the name wasn't passed from step one maybe we can display something right so you have a
44:56
bunch of logic here um and another cool thing is po this will also process post parameters okay
45:03
um now what is that Joe okay um so um if we didn't want all of that data passed
45:11
to the URLs okay um then we do have more options actually
45:18
well before I do this okay a very cool feature of having form data passed via
45:26
URL okay let's um I'm going to I'm going to open up I
45:32
had this URL right all let me let me put
45:39
this all right so I have a URL that has all of this data okay um all right hold
45:46
on one one second let me go ahead and just for just for fun in this final step
45:51
okay what I'm going to do is I'm going to um I'm going to put in the actual
45:57
form Fields so we can actually see them Joe what is the limit on a URL for
46:04
the length it is a lot it's um it's like two megabytes or something like
46:12
it's it's a ton of text um I think Firefox has the has the smallest um
46:19
limitation um we we can look that up in a little bit it's a good question a very valid question um and something you
46:26
you'd want to make sure sure you didn't have too much data when you're using this get URL action okay but it is
46:31
pretty big um okay so in this final step um it's going to display all that data
46:37
instead of it being hidden okay and why why this feature is cool okay is you can
46:43
save states of your forms now I think I did this at some point during a live stream because I remember I helped David
46:50
day out where we saved the state of a form into a URL so that you can always
46:57
get EX directly back to that particular state of the form okay so how are we
47:03
going to do that now if we look this was the URL that I got from that right so let's say I want to go exactly back to
47:10
the state of this form I just copy this URL let's just um uh let's just preview
47:16
this okay so right now I'm not on blank form but what I'm going to do is I'm going to paste that URL that we had from before and guess that blah right there
47:24
pre-filled out form just by from a URL right so I remember uh David he
47:32
built this solution out where he saved this URL and he he put the URL in a button in his customer's email and all
47:40
the customer do is click the email and boom it took into the form pre-filled out with whatever data you know that
47:46
person needed right I forget the exact situation but it was pretty awesome and it used exactly what this
47:54
is right super power okay now
48:01
um went off on that little tangent now let's say we I want to data to pass between my forms without updating the
48:08
URL I don't want this data in the URL maybe it has some sensitive data you don't want it saving the browser history
48:14
or whatever right um You don't want this there's other ways to do this okay and
48:20
so instead of a get action we're going to use a post URL action okay and you're just going to
48:25
configure it the same exact way okay so I'm just going to delete so
48:32
we're just going to change all of these um get URL actions to be a post URL
48:43
action all right um so let's go ahead and review
48:48
that um I'm going to say Joe my email
48:54
right step two um let's just say go to final step right now um now if you look
49:00
here none of the data was passed okay but the data is there okay um how how do
49:07
we know that Joe how can I believe you okay so um agent URL allows us to post
49:13
uh um uh process post parameters okay and I'm going to process if the name
49:18
equals Joe okay if the name equals Joe this text area should should display and
49:24
if you looked you remember right oh got to go back
49:32
previe so if I go ahead and uh if I fill this out with Joe and put in an email
49:38
okay I'm GNA say boom now I know that this worked because this form field
49:45
exists now does that make sense right so
49:50
because um that form field only exists if the post URL parameter is is Joe
49:56
right so if I go back okay if I do Josh
50:04
here only that that Top Field doesn't exist right so even though the data is not in our URL the data is still passed
50:11
to the HTTP request and we can still process that information with
50:17
agent pretty cool okay
50:25
um now the question is I I I forget if
50:31
you're using post right hold on I'm GNA test something really quick before I I
50:37
know what I'm before I say something wrong um let me find those hidden Fields here
50:45
if you send post data the hidden Fields won't automatically get the data okay so we're going to have to augment that a
50:52
little bit um I'm pretty sure let me just verify that really
51:01
quick correct okay so if we use the post Ural parameters okay the postural action
51:08
remember on this step how I added the hidden data and it automatically got that hidden data from the URL when we
51:15
move from get to post that doesn't happen Okay um so what we need to do is
51:22
uh we need to inject that in okay and this is a a a little bit of code okay
51:27
but basically you just do um an echo okay uh dollor
51:35
poost and then um we're going to put in the the field so
51:44
email actually you know what I think oh look at that I forgot I added you can do Post okay even easier you can do Post
51:51
request data because I already thought about this and then you can just type in email here that's right so here instead
51:56
of custom value you do Post request data and you do name look at that man pass
52:01
Joe was brilliant he was brilliant that pass Joe
52:07
okay so now um if I go ahead and refresh
52:13
this let's see if I um here this is little developer stuff here but I'm
52:19
going to go this is the hidden field here now I'm just going to get that field value just to make sure well here
52:27
let's let's restart the form thing so we can kind of make sure that we get it all we're going to do let's just do
52:35
Josh email okay go to step two I want to make
52:41
sure that those those hidden Fields have data this
52:48
one zero
52:55
y boom there we go the the while you can't see it that that hidden field has
53:02
the value of from the previous step so boom Works um yeah very cool uh so we can use
53:09
agent URL now another uh agent stack that we have access to is Agent if now
53:16
this does require you to have some sort of knowledge um because basically what
53:22
you can do is you can write some PHP statements in here to do all kinds of Stu right so um uh yeah you would have to do
53:30
something like if you wanted to process these post URL parameters you could do something like um dollor poost um
53:38
email okay um you know equals or doesn't
53:44
equal um you know something you know you know support you know whatever okay um
53:51
so you can do other things and you can also do some PHP fun if you got really fancy you could be like um string starts
53:58
with Joe or something like that right there there's some I'm not going to go into all the various bits of PHP you can
54:05
add into here um if you know a little bit of PHP Scott definitely probably I
54:11
know Scott uses this a lot you can do all kinds of interesting logic here um
54:16
that evaluates to a true or false statement in PHP and at that point here you can then do add else and else if
54:23
statements right so You' be like if this else if this and then have like a catch all at the bottom so um this is a very
54:33
definitely a more advanced stack um but you could take this logic that we've been kind of working with and take it
54:39
definitely to the next level and do some really cool stuff okay um all right last uh last
54:48
thing here is I want to go ahead and in the final step uh I'm going to go ahead and I'm going to delete all of these and
54:55
we're going to add in our hidden Fields again uh this is name and emails I'm I'm
55:03
going to delete this and just take the comments so we have name name email and comments in our um final step okay
55:13
um there and then uh we want to add the third one which is
55:24
comments and this is all going through the post request data okay and so let me make sure I yeah I did post request
55:30
there right so now what I want to do is um Step One connects n collects name and
55:37
email step two collects comments okay and then the final step we want to
55:42
display that information as like confirm your data here basically okay so um we could do
55:52
that pretty easily with pod right so uh let's go ahead and uh let's do
55:59
that so this is part I'm really excited about okay um let's just add
56:07
Pi I should have gave Pi a different name so that like everything has pi ha that okay
56:15
um so we're going to need to
56:20
um let's do like piie or let's do like show name okay um
56:29
and then this is going to be process formula as text and all it's going to be
56:35
is um main
56:41
okay I don't use Pi very often I'm pretty sure this is this should work okay then we just do email okay and then
56:48
we do email okay and then uh we just
56:54
do comments so you're going to have to add one of these for every form field so if you have a lot of form Fields it
57:01
could be a lot and it is a little monotonous because it's just basically telling Pi
57:07
um he get get just the name field you have to make sure you process formula as
57:12
text because normally Pi is meant for math okay but we're we're using it for text here
57:19
okay and um let's just show this snippet so then basically wherever I put this
57:25
okay so pi show name it will display that it will display the name okay so
57:31
what we're going to do is I'm I'm just going to go ahead and let's just uh I'll keep it simple I'll just do a header
57:36
stack okay um and I'm going to do um Name colon okay and then it's this class
57:45
span show name okay so we're gonna do there Way Joe to use that for that select option I was doing earlier where
57:52
would you could actually have it show above that field the name of what we selected that's what I said earlier is
57:57
that like you could use Pi for that that's what I was thinking right you could potentially use pi to show it
58:04
as you're doing it right so instead of you writing your own JavaScript and that's kind of what Pi's deal is you
58:09
know what I mean is anyways yeah yeah we got I got to play with that okay um oh
58:15
here uh we're g to make make my life a little easier what we're going to do is I'm going to um so inside Pi you can
58:22
provide a prefix so on this in this one I want to pre prefix it with name okay
58:29
um and then here I'm just going to do PI show name here uh Pi Dash show Dash
58:37
name okay and that that should do it right we don't need to show this STI
58:42
anymore so what what this even though I have named colon here we could put whatever the heck we want in here it doesn't really matter it's just going to
58:48
it's going to replace it okay so
58:54
um okay just to show you how so the header doesn't matter what the contents is
59:00
because I have I put that Pi class as the class of the header and then Pi I
59:06
told it to prefix the value with Name colon so it's going to be Name colon and then the name does that make sense okay
59:13
so then all I'm going to do is just going to copy and paste this and we want to do piie show
59:18
email okay and in here I want to prefix this with um
59:24
email okay and and then here we're going to do uh Pi show
59:32
comments okay and here instead of a header we'll make that one a paragraph okay
59:40
and should do it right oh prefix uh
59:46
comments all right this should do it so um once we go
59:54
to step three we won't see any of the form data we'll see the form data as
1:00:00
text on the page but we still have a submit button that allows us to submit
1:00:05
that data okay so let's uh let's see if it all
1:00:11
works all right so here we have our step one I'm going to do um Joe and we're going to do
1:00:19
support fill it in okay go to step two um some comments we're going go to
1:00:25
the final step oh what the heck happened here what I do
1:00:32
darn it joshu broke unexpected token and what did I do
1:00:40
here Scott brought up an option if you were just trying to display the fields you could put a disabled input field
1:00:47
back in there but if you're wanting it to very true yes that that's I'll show
1:00:52
that yeah I could show that you could just show uh you could put in the input field and just disable it very good
1:00:57
point Scott um but by doing it this way maybe you could you know it could would
1:01:02
look like actual text on the page you know maybe look you know then you can style a text or do whatever you know um
1:01:09
but yeah I that's a great Point Scott um let me see if I can figure out what the heck because if you wanted to have like
1:01:15
um printer stack right and then you wanted to display the text from the fields into a printer stacked deal you
1:01:23
could do it this this would be the way to do it
1:01:35
it Jake R thing no it's
1:01:54
not
1:02:25
freaking me
1:02:32
heck do I have to do I do do
1:02:38
this I think I have to do
1:02:48
that let's
1:02:53
try oh oh interesting it's hold
1:03:00
up oh there's no post data oh I got to restart the form because you can't just refresh the page because there's data
1:03:08
that ain't gonna work yeah that looked like it worked though
1:03:14
all right so uh you just needed to put it into quotations
1:03:20
yeah oh wait that how come the Raw data
1:03:29
is why is it displaying the
1:03:38
PHP the oh wait my file name is is HTML
1:03:47
rookie rookie make sure you page your
1:03:54
Jesus because I took agent off and agent changed it to PHP and this that's a
1:03:59
dangerous thing when it auto changes it auto changes back yeah that is that is definitely dangerous this is very
1:04:06
dangerous all right just a quick lesson everybody when you create a new project file go ahead and go into advanced and
1:04:12
default extension should be PHP okay
1:04:18
okay third times a charm go
1:04:24
boom step two my comments final step boom there we go and
1:04:31
if you click submit it would do the normal form action can you just quickly show again
1:04:37
what what you did on the pi stack sure like the name yeah so when um because Pi
1:04:43
by default it it thinks you're it wants to do math right that was originally why Pi was developed okay yeah yeah um so if
1:04:50
you want to make sure that the Val this value is a string okay then you need to put uh the
1:04:57
the the contents in here inside double quotes as well as check this Box's process formula as
1:05:04
text and then you put that P name show name on the header stack yeah so so yeah
1:05:10
um whatever you set as your Pi name it's going to be Pi Dash whatever as the
1:05:15
class and if you ever forget to say show snippet and you can see the classes right here piie show name right so at
1:05:22
that point um now I show a span and you can put span wherever but we already know classes and I know if I just put
1:05:29
that it's going to replace the contents of whatever has this class with the
1:05:36
contents make sense
1:05:43
indeed so there you go um and for fun here let's let's quickly show off uh
1:05:50
Scott's idea I'm going to duplicate this form so we have both of them in the project file when I send them out here
1:05:56
I'm going to I'm going to get rid of Pi in this first example and I'm going to
1:06:02
get rid of the Hidden data okay um and
1:06:07
what I'm going to do is I'm going to copy the copy that and
1:06:14
then copy these two move that submit down move
1:06:22
these comments and then what we're going to do is we're going to oh but now we
1:06:28
what we're going to have to do is in order to get the default value here from the post data because um because we're
1:06:34
using post instead of get if you're using the get you don't need to do anything here this will just work uh
1:06:39
well you will you will want to set these to be read only so you would set all of these uh all of these to be
1:06:46
readon okay um but because we're using post and not get if you're using the get
1:06:52
request you'd be done at this point because foundation will autofill the get request as the value okay but because
1:06:58
we're using post we're going to have to do uh that little bit of that PHP Snippets so we're going to do um Echo um
1:07:05
dollar poost square bracket uh
1:07:12
name semicolon close PHP all right so that's the
1:07:18
name interesting that does mess up things in in edit value but it it will work right and then we do
1:07:26
that but this is email and then this is going to be uh
1:07:35
comments actually I bet you if I did instead of double quotes if I use single quotes here it probably wouldn't mess up
1:07:40
edit mode there we go
1:07:46
yeah because HTML is stupid it's not intelligent I should say
1:07:53
it's not that HT HT isn't good okay so there we go um now let's well we'll have
1:07:58
to redo the whole thing because we're using post so we're going to go here
1:08:04
um show email
1:08:10
go whatever final step and there we go so now we have this this first example
1:08:16
is uh you know kind of re we made these fields read only so you can still see the data and then you can submit or this
1:08:23
one it shows you know text a text ual version of the data which at that at this point you can style it any way you
1:08:29
want with columns and swatches and all kinds of stuff right so two different implementations they both should work on
1:08:36
the second one just a little bit fancier using pi and then you can style it any way you
1:08:43
want pretty cool awesome what do you think Josh I
1:08:49
it's actually pretty cool I think it's pretty awesome trying to figure out how I do it in my in my case where you're
1:08:56
pulling the data out of feeds and how that would work
1:09:01
um seems trickier yeah what do you think about the agent thing you think that
1:09:06
interesting I think the agent thing uh opens up some possibilities I think it's going to be very specific needs for that
1:09:13
but I think definitely no and I think it's actually pretty awesome because
1:09:18
it's just one more tool in your tool box of ways to to do things yep you
1:09:23
know um I think there could be some very powerful use cases for using agent in
1:09:28
that aspect sweet I appreciate it I I know you got to uh get going uh so uh thank
1:09:36
you for popping on and I I think we're done anyway let's see if there's any other questions that I
1:09:45
uh oh no I think we're good I think we're good I sent you off that project file so you have it there awesome thank
1:09:53
you very much everyone I'll I'll make sure I post this uh to the uh the event for this live stream I'll just post a
1:09:59
download link um in the in the comments there so you can go get this project file um I'll upload that in a few
1:10:05
minutes okay everyone sweet thank you very much for coming on hey no R thank
1:10:12
you very much everybody hopefully we'll see you on Friday Hangouts be there be square see you
1:10:17
then bye cheers