00:00:05:15 - 00:00:07:07
The basic tutorials on the Infigo
00:00:07:07 - 00:00:11:03
Form Builder have covered
dealing with the entire form.
00:00:11:06 - 00:00:14:09
So for example, we are provided a textbox
00:00:14:14 - 00:00:20:09
where the entire contents of that textbox
is controlled by one of our form fields.
00:00:20:11 - 00:00:25:02
But what if we want to change only parts
of the text within a text field?
00:00:25:04 - 00:00:27:10
In this example
will cover this functionality
00:00:27:10 - 00:00:32:26
by showing you how to configure basic
variable text in the Infigo form builder.
00:00:32:28 - 00:00:37:05
Our example will result in a text field
which contains some static text.
00:00:37:05 - 00:00:41:16
So in our example,
my name is followed by variable text
00:00:41:18 - 00:00:44:08
which is entered
by the user on the actual form
00:00:44:08 - 00:00:50:23
itself.
00:00:50:26 - 00:00:52:11
So in my example,
00:00:52:11 - 00:00:56:10
I'm going to utilize a product
which I've already set up.
00:00:56:12 - 00:01:08:07
So all I've done is created a MegaEdit
product and assign some resources to it.
00:01:08:09 - 00:01:10:11
You can do this on a new product
or you can do
00:01:10:11 - 00:01:13:17
the same process on a product template
that you've already been working on.
00:01:13:20 - 00:01:17:09
The choice is completely up to you.
00:01:17:11 - 00:01:21:10
So within this actual product details
page, I'm going to go to its MegaEdit
00:01:21:10 - 00:01:26:00
configuration
settings up on the top right?
00:01:26:02 - 00:01:27:19
Go over to the scripts tab
00:01:27:19 - 00:01:32:03
and you can see in my case, I've already
enabled the refactored form builder,
00:01:32:06 - 00:01:35:24
which is the one we utilize
for the Infigo form Build a script
00:01:35:26 - 00:01:37:20
just as a word of warning.
00:01:37:20 - 00:01:41:09
And when we get closer to the release
date, the name of this particular
00:01:41:09 - 00:01:43:12
bit of functionality might change.
00:01:43:12 - 00:01:46:12
Okay, so with the script activated,
I'm going to go on
00:01:46:12 - 00:01:50:18
the config of that particular script
over on the right hand side.
00:01:50:21 - 00:01:53:04
Now, bear
in mind that if you go into the config
00:01:53:04 - 00:01:57:02
from within an actual product itself,
you're going to be modifying the script
00:01:57:02 - 00:02:00:03
or configuring the script
on that particular product.
00:02:00:03 - 00:02:02:19
Only We have two options
when configuring the form.
00:02:02:19 - 00:02:03:22
Build a script.
00:02:03:22 - 00:02:07:23
We can do it on a product by products
basis, which is done on this current
00:02:07:23 - 00:02:08:20
screen here.
00:02:08:20 - 00:02:11:20
So you can individually tweak
00:02:11:22 - 00:02:16:10
the script configuration for each product
you want it on,
00:02:16:13 - 00:02:19:11
or we can configure the script globally.
00:02:19:11 - 00:02:22:22
And this means that any script alterations
or configurations
00:02:22:24 - 00:02:28:09
will apply to all products
that are using that particular script.
00:02:28:12 - 00:02:29:18
There's two ways we can do this.
00:02:29:18 - 00:02:34:13
We can either go straight to its global
config by clicking that here.
00:02:34:15 - 00:02:37:22
Alternatively,
if you want to know where those are stored
00:02:37:24 - 00:02:43:27
by, just go to my admin
and search for MegaEdit scripts.
00:02:43:29 - 00:02:47:19
They're all kept within here
00:02:47:21 - 00:02:48:13
so you can see that
00:02:48:13 - 00:02:51:28
we've had the form
builder located in here.
00:02:52:01 - 00:02:54:04
by the time
you actually utilize this functionality,
00:02:54:04 - 00:02:56:08
it might be in the hardcoded scripts
at the bottom.
00:02:56:08 - 00:02:59:04
So just looking both sections
just in case.
00:02:59:04 - 00:03:02:20
And if we want to configure the script
globally, I'm just going to click on
00:03:02:20 - 00:03:03:28
global config now.
00:03:03:28 - 00:03:11:25
So your question might be at this point,
where do we begin?
00:03:11:28 - 00:03:14:02
We need some kind of frame of reference
00:03:14:02 - 00:03:17:02
as to how to actually
configure this script,
00:03:17:05 - 00:03:21:00
but we do actually have this
for the Infigo form builder.
00:03:21:02 - 00:03:25:11
If I just immediately go back out of this,
00:03:25:14 - 00:03:28:10
locate
the form builder in my MegaEdit scripts
00:03:28:10 - 00:03:34:22
again, and this time
I'm going to go to the edit button
00:03:34:25 - 00:03:35:22
and this will take us to a
00:03:35:22 - 00:03:38:22
screen showing full configuration details
00:03:38:23 - 00:03:45:10
for that particular script.
00:03:45:12 - 00:03:46:26
So this is a very useful screen.
00:03:46:26 - 00:03:50:12
It details all of the possible
configuration options within the script.
00:03:50:14 - 00:03:54:10
In addition, this set of information here
00:03:54:12 - 00:03:58:06
contains a vast array of notes
giving you insight into what
00:03:58:06 - 00:04:04:08
the different elements do and how
they're supposed to be populated. It.
00:04:04:10 - 00:04:05:24
So I'm going to scroll down to a certain
00:04:05:24 - 00:04:10:00
bit of this to cover the variable text
that we're looking at at the moment.
00:04:10:00 - 00:04:11:03
Okay. So here we go.
00:04:11:03 - 00:04:14:02
Starting here
00:04:14:02 - 00:04:15:15
I'm looking at text variable
00:04:15:15 - 00:04:21:26
handling custom.
00:04:21:28 - 00:04:24:20
this enables the variable
handling of form builder.
00:04:24:20 - 00:04:29:00
If set to true, if it's set to false,
it will do the same function ality
00:04:29:07 - 00:04:37:14
as the batch mode does.
00:04:37:16 - 00:04:38:17
And in the vast majority of
00:04:38:17 - 00:04:41:17
cases
this will be configured on a per product
00:04:41:17 - 00:04:44:24
basis.
00:04:44:26 - 00:04:46:19
Next time we have text variable
00:04:46:19 - 00:04:49:19
prefix and text variable post fix.
00:04:49:26 - 00:04:54:26
So this contains the string of text that
precedes and follows our variable name.
00:04:54:28 - 00:05:00:08
This allows us to easily define where
a variable is to be used on our product.
00:05:00:08 - 00:05:05:02
So for example, if we've got this prefix
and this post fix here
00:05:05:04 - 00:05:08:27
and then the actual name
of the variable itself is variable,
00:05:09:00 - 00:05:12:25
our complete text string entered
onto our template in order to use this
00:05:12:25 - 00:05:20:13
variable will be [++Variable++]
00:05:20:15 - 00:05:27:16
And we'll see this a little bit later.
00:05:27:19 - 00:05:30:10
Next up, we have text variables look up.
00:05:30:10 - 00:05:33:17
So this is how we can define our custom
variables.
00:05:33:19 - 00:05:37:25
In the script editor
you will see a range of informative text
00:05:37:27 - 00:05:41:07
showing you how
this is configured and populated.
00:05:41:09 - 00:05:44:12
So for our example, I'm going to copy this
00:05:44:12 - 00:05:48:06
content
as a template for our custom variable
00:05:48:09 - 00:05:56:16
and place it into the global configuration
for our form Builder script.
00:05:56:18 - 00:05:57:17
Okay, so I've pasted
00:05:57:17 - 00:06:01:11
that into our global configuration.
00:06:01:14 - 00:06:02:13
This is a template.
00:06:02:13 - 00:06:05:22
This is what we're going to work from
to start populating a variable,
00:06:05:22 - 00:06:08:06
and it will all start
to make a bit more sense.
00:06:08:06 - 00:06:11:23
so we're going to start off
by actually reformatting this slightly
00:06:11:23 - 00:06:14:23
so it's actually usable as a variable.
00:06:14:26 - 00:06:18:16
What I mean by
this is at the moment it's kind of
00:06:18:18 - 00:06:21:05
commented out,
so it's not actually going to be used.
00:06:21:05 - 00:06:24:15
It's just done
using this little icon here.
00:06:24:16 - 00:06:26:26
So if I get rid of that,
00:06:26:26 - 00:06:29:24
you can see that
all of that now changes color because it's
00:06:29:24 - 00:06:34:07
now what you're going to be usable
as part of the configuration.
00:06:34:10 - 00:06:34:19
All right.
00:06:34:19 - 00:06:38:20
So looking at the variable name,
first of all,
00:06:38:22 - 00:06:41:03
which is this section here in our example,
00:06:41:03 - 00:06:45:08
so this is the name of the variable
and we'll form part of the texture
00:06:45:08 - 00:06:49:22
that you input into your templates
in order to utilize the variable.
00:06:49:24 - 00:06:54:08
This field can be admin only and does
not have to be displayed to your end user.
00:06:54:08 - 00:06:57:17
So you can give this a naming convention
which is just relevant to you.
00:06:57:20 - 00:07:00:05
It doesn't have to be shown to the end
user.
00:07:00:05 - 00:07:03:05
I'm just going to have this as G
because it's a global variable
00:07:03:05 - 00:07:11:11
that's just my own way of
remembering it. And then name
00:07:11:13 - 00:07:11:26
the next
00:07:11:26 - 00:07:15:17
option down
here is the ability to define a label.
00:07:15:19 - 00:07:16:15
So this is the name
00:07:16:15 - 00:07:20:20
that is associated with the variable
and will be used as a label on the form.
00:07:20:20 - 00:07:23:04
So this will be shown to the end user.
00:07:23:04 - 00:07:26:26
So this needs to be a bit more user
friendly.
00:07:26:28 - 00:07:34:23
It's going to put this as name,
00:07:34:26 - 00:07:35:07
right?
00:07:35:07 - 00:07:39:16
So next down we have value
and this allows us to specify
00:07:39:16 - 00:07:44:03
any pre defined values
so this does not have to be filled in.
00:07:44:06 - 00:07:45:29
However, if you would like the variable
00:07:45:29 - 00:07:49:26
to show some predefined text,
it can be specified here.
00:07:49:29 - 00:07:52:04
This can be static text
00:07:52:04 - 00:07:55:04
or you can utilize existing customer data.
00:07:55:10 - 00:07:59:02
For example, inputting
00:07:59:05 - 00:08:02:29
this here, which is in our example text.
00:08:03:01 - 00:08:08:03
Let me just copy this
00:08:08:06 - 00:08:09:04
paste here.
00:08:09:04 - 00:08:15:01
So we've got load user
data, first name, last name.
00:08:15:04 - 00:08:16:19
So this will populate the field
00:08:16:19 - 00:08:21:08
with the name of the logged in user
if it's been defined on their account.
00:08:21:10 - 00:08:23:17
So for example,
if they've got their own user account
00:08:23:17 - 00:08:27:14
and first name and last name are defined,
then it will drag that information
00:08:27:22 - 00:08:34:05
into this particular variable value
by default,
00:08:34:08 - 00:08:37:15
available
fields are listed in the script editor
00:08:37:18 - 00:08:41:20
and include things like names, address
fields and emails.
00:08:41:20 - 00:08:43:15
So you can see them all here.
00:08:43:15 - 00:08:45:18
However, for the purpose of
00:08:45:18 - 00:08:49:09
actually getting this script to function,
I'm going to get rid of.
00:08:49:11 - 00:08:50:02
That's helpful.
00:08:50:02 - 00:08:59:02
Text.
00:08:59:04 - 00:08:59:16
Okay.
00:08:59:16 - 00:09:04:02
Next, we have input, so this allows you
to define the type of inputs.
00:09:04:02 - 00:09:07:02
This variable field should be.
00:09:07:04 - 00:09:09:17
For example, text fields
that is by default
00:09:09:17 - 00:09:13:15
will provide a single line
text input and data picker
00:09:13:18 - 00:09:18:13
will provide a calendar selection tool,
as we saw in a previous tutorial.
00:09:18:15 - 00:09:22:14
Available inputs in here are I just
00:09:22:16 - 00:09:23:18
put a comment on here so you
00:09:23:18 - 00:09:27:22
can see we've got text fields,
00:09:27:24 - 00:09:31:18
text area
00:09:31:20 - 00:09:36:18
picker and time picker.
00:09:36:21 - 00:09:38:25
We just want to put one of those in here
00:09:38:25 - 00:09:48:10
based on the type of input you would like.
00:09:48:13 - 00:09:51:02
Okay,
so we can optionally enter a placeholder.
00:09:51:02 - 00:09:54:20
This is temporary text
that is displayed in the form field
00:09:54:23 - 00:09:59:01
in the event that no other text is present
and it will serve as example text
00:09:59:01 - 00:10:03:25
only the two following options are prefix
and suffix.
00:10:03:27 - 00:10:05:16
This allows you to optionally define
00:10:05:16 - 00:10:09:07
if any text should proceed
or follow the variable value.
00:10:09:09 - 00:10:11:12
So in our example,
we'll put something in here
00:10:11:12 - 00:10:15:23
just to be able to demonstrate it
for clarity.
00:10:15:25 - 00:10:18:13
And it could be used for things
like spacing
00:10:18:13 - 00:10:21:16
and a consistent static text
00:10:21:16 - 00:10:25:17
if you need to input something like that
and other such examples.
00:10:25:20 - 00:10:28:24
In our example,
I'm just going to put a double dash
00:10:28:24 - 00:10:33:18
just so we know
it's actually doing something.
00:10:33:21 - 00:10:35:03
One other use case
00:10:35:03 - 00:10:38:29
is to automatically
put a line break using \n
00:10:38:29 - 00:10:45:12
and we'll cover this in more detail
on another tutorial.
00:10:45:14 - 00:10:45:26
Okay.
00:10:45:26 - 00:10:49:07
And the last option here is the ability
to optionally enter help text.
00:10:49:07 - 00:10:53:05
So if required, enter text
to appear on a tooltip
00:10:53:05 - 00:11:02:26
to assist your end users.
00:11:02:28 - 00:11:04:04
Okay, so we're nearly done.
00:11:04:04 - 00:11:05:05
The last thing we need to do
00:11:05:05 - 00:11:08:16
is make sure that we've correctly
formatted the script config.
00:11:08:18 - 00:11:12:14
So if you try and save the script config
as a nonviolent
00:11:12:16 - 00:11:17:02
Jason formats as I've tried to do here,
00:11:17:05 - 00:11:20:20
the save will fail and it will issue you
with a warning down here.
00:11:20:23 - 00:11:24:08
So make sure that you amend the script
into a suitable format.
00:11:24:11 - 00:11:25:29
Such as
00:11:25:29 - 00:11:30:11
well do right now.
00:11:30:13 - 00:11:30:24
Okay.
00:11:30:24 - 00:11:32:22
So I've hit save.
It's not come up with a warning.
00:11:32:22 - 00:11:35:06
So that has now been accepted.
00:11:35:06 - 00:11:39:21
I'm not going to reload
the MegaEdit product and add a text field.
00:11:39:21 - 00:11:42:10
So you need to either
launch the product in MegaEdits
00:11:42:10 - 00:11:47:01
or if you've already got it open,
just make sure you relaunch it.
00:11:47:03 - 00:11:49:28
Okay, So here's my
00:11:49:28 - 00:11:55:10
text field.
00:11:55:12 - 00:11:57:12
So once again,
I'm going to go to the custom tab
00:11:57:12 - 00:12:00:16
where we start formatting our Infigo form
build
00:12:00:18 - 00:12:03:24
options.
00:12:03:26 - 00:12:05:02
I'll start off the usual way
00:12:05:02 - 00:12:10:01
or enter a field name
00:12:10:03 - 00:12:13:25
and if you need to,
you can do any additional configuration.
00:12:13:25 - 00:12:17:16
So get rid of formatting, change
the interactivity settings,
00:12:17:16 - 00:12:21:04
whatever you need to do.
00:12:21:06 - 00:12:23:11
I'm going to go to the advanced
configuration options
00:12:23:11 - 00:12:26:02
for this particular field
00:12:26:02 - 00:12:29:02
and this time
we're going to use a new field type.
00:12:29:08 - 00:12:32:00
This is going to be variable text
00:12:32:00 - 00:12:34:06
and in order to use our defined variables
00:12:34:06 - 00:12:36:03
that we've done in the script
configuration,
00:12:36:03 - 00:12:41:23
the variable text is what you need
to select from that dropdown.
00:12:41:25 - 00:12:44:25
Any correctly defined
variables will be displayed
00:12:44:25 - 00:12:48:09
underneath the field text cache area.
00:12:48:12 - 00:12:54:19
So you see here we've got our name field,
00:12:54:21 - 00:12:55:05
so any
00:12:55:05 - 00:12:58:27
text that we want to appear
in the actual field on the canvas,
00:12:59:01 - 00:13:02:00
we need to make sure it's
within this field text cache.
00:13:02:00 - 00:13:05:08
And this is a combination of static text
if you need it
00:13:05:10 - 00:13:09:21
and these actual variable identifiers.
00:13:09:23 - 00:13:13:16
In our case,
I'll put some static text so my name is
00:13:13:18 - 00:13:17:06
followed by
00:13:17:08 - 00:13:30:21
that variable identifier.
00:13:30:24 - 00:13:32:16
You'll see that
as I click out of that box.
00:13:32:16 - 00:13:34:11
He recognizes it's now ready.
00:13:34:11 - 00:13:37:27
So you'll see that the field now
appears over on the right hand side
00:13:37:29 - 00:13:40:09
and certain information
has already been populated.
00:13:40:09 - 00:13:43:08
So it's recognized
that we have some placeholder text.
00:13:43:08 - 00:13:44:02
It's recognized
00:13:44:02 - 00:13:47:22
that we've asked for some help text
and it's name the fields, for example.
00:13:47:25 - 00:13:50:02
You see that
we've still got some formatting options.
00:13:50:02 - 00:13:54:02
We can disable those in the usual
way if we don't need them.
00:13:54:04 - 00:13:56:11
So if I start typing in the form here,
00:13:56:11 - 00:14:00:08
you'll see it automatically starts to
populate the field on the canvas itself.
00:14:00:11 - 00:14:03:27
and this includes the prefix
and the suffix that we specified
00:14:03:27 - 00:14:05:21
in our configuration.
00:14:05:21 - 00:14:08:21
Now of course we don't need this,
we've just put it in as an example.
00:14:08:21 - 00:14:10:05
It's just to demonstrate its use.