Registration form
Eventmaker comes with a powerful language editor for your custom registration form. It’s derived from the markup language Liquid. This page shows you how you can use the custom Eventmaker liquid tags and variables to build your registration form. Please note that this form will embed the Bootstrap CSS so that you can use any of the fancy classes on your fields.
Liquid variables
Here are the variables available to use in Liquid for the custom Registration Form :
Pre-fill form with URL parameters
By providing the right URL query string parameters, you can pre-fill the Eventmaker registration form. To do so, append to the form URL the url-encoded list of parameters. The parameter names will be the first argument of the {% guest_field %}
and {% guest_field_name %}
tags. As an exemple:
In addition to that you can pre-fill the following fields :
payment_promo_code
utm_source
utm_medium
utm_campaign
Simple guest field
This is the simplest tag, which will by default result in a form text field <input type="text" />
. The first argument is the property name of the field (native Eventmaker field or metadata), the second argument is the label for this field (displayed on the left of the text box).
You can use all the HTML attributes as option with this tag. Some examples:
Option
Example value
Details
required
true
Whether this field is mandatory to fill.
readonly
true
Use it to prevent users from modifying the field
placeholder
"12/12/1992"
The placeholder HTML tag giving some hint to the user on how to fill the field
help-inline
"We must be sure you are above 18."
Some help text displayed on the right of the text field
maxlength
5
Limit the number of characters inside the text field
type
file
, number
, date
, textarea
or hidden
Change the type of data the field will accept / the control itself
class
input-xxlarge
Some CSS class to apply on the generated <input />
element
This way you can compose more advanced guest fields, like the following:
You can create a basic file input field as follows:
You can even create a direct upload file input that uses ajax and a progress bar to upload your file:
An additionnal option is present for email if you need to check in ajax the presence of a guest with this email into the guest_category
Note that you can also require a field conditionnally :
For linked guest you can require a field comparing a main guest field, to achieve that simply use the prefix `main_guest` into the condition
For country field, this tag generate a dropdown list of countries. You can specify the first country of the list.
The VAT Number liquid tag enables a few functionalities associated with the new `vat_number` standard field, and is particularly useful when the organizer needs to enable VAT exemption for their registrations.
The liquid tag provides a few options. But you can also provide no option to the tag, in this case the default values will be used just as follows :
Option
Default value
Details
required
false
Whether this field is mandatory.
validate
false
Prevents from submitting an invalid VAT number
readonly
false
Prevents from changing the field value
live-check
true
Checks whether the VAT number is valid while filling the form and updates cart if necessary.
no-icons
false
Disables all icons associated with the live check of the field.
help-block
""
Help text. For example "Type your VAT number here"
Advanced guest field
Eventmaker provides you an alternate tag, {% guest_field_name %}
to get event more control over the form. You may need to have a mandatory checkbox where people have to agree with terms of services. Here is how you can do it
Drop down lists
Dropdown lists in HTML are <select />
tags with a few nested <option />
. You can generate some of them with the following syntax:
You can group options by using the following syntax:
You can also use the power of Liquid to generate a three drop down lists component to register a birth date:
If you define a specific values list for a guest field, you can use the `guest_select_from_field` tag instead to display a dropdown list, without specifying any option.
The property selected:"France"
selects the option with the value equal to "France", whereas required:true
make the dropdown list required.
You can pass any previously defined property to this tag except for type
.
Radio fields
Radio buttons can be identified to drop down lists as they provide the same feature, which is choosing one value from a given list. That's why the tag syntax is close:
If you define a specific values list for a guest field, you can use the `guest_radios_from_field` tag instead to display a radio buttons group, without specifying any radio.
The property checked:"Male"
pre-checks the radio button with the value equal to "Male", whereas required:true
make the group required.
You can pass any previously defined property to this tag except for type
.
Checkbox fields
Radio buttons have cousins, the checkboxes. But a checkbox is a field in itself, with a boolean value. That's why if you have a "group of checkboxes", you need as many guest fields as the number of checkboxes.
This is the HTML generated by the liquid tag:
You can use the following options with this tag:
Option
Example value
Details
required
true
Whether this checkbox is mandatory to check.
checked
true
This checkbox is checked when the page loads
value
"Yes"
By default, the checkbox value is set to 1, but you can override it with your own value.
class
"my_class"
You can stylize the checkbox or its label by adding a class.
control_label
"Terms of services"
You can add a title to the checkbox which is different from the clickable label.
group
true
You can group several checkboxes by adding the group option to each one of them.
This is the HTML generated by the liquid tag:
Check-in points
If you have check-ins points not linked to the guest category for which you edit the registration form, you can let your user register to specific check-in points. With the following code, you will generate a check box for each check-in point.
You may want to display a checkbox for each check-in point according to the value of one or several traits. In that case, use the following code, in which we display the check-in points with the traits type
as conferences and date as 28/02; we also use the trait form_label as the checkin-point label.
You may want to display a checkbox for each check-in points, except for 1 or 2. In that case, use the following code, in which we exclude 2 check-in points by specifying their id.
Sometimes you may want to group check-in points as alternatives, meaning that a guest can choose at most one check-in point among several options. You then need radio
buttons, so for each check_in_point
tag, you need to pass the radio_group
option. Please note that the name of the radio_group
won't be displayed anywhere, it only serves to identify which groups of alternatives.
By default, the label next to the checkbox is the Check-in Point name. You can override this text with the label
option.
If your check-in point has a capacity set, you can display the remaining slots with the display_remaining
option.
If you want to set a "unique access" policy to your check-in point, use the max_allowed_accesses
option.
If you want to set "more access" policy to your check-in point, use the max_allowed_accesses
option.
If you want to set a “unlimited access” policy to your check-in point, use the max_allowed_accesses
option. </p>
You can use the following options with this tag:
Option
Type value
Example value
Apply to
exclude_vat
Boolean
true
checkin_point
Accompanying people
This tag allows you to add one or several accompanying people. The same as the main guest, you can use the following fields for the accompanying person : simple guest fields, checkin-in points, drop down lists, radio and checkbox fields.
An identity field must also be present for the accompanying person to be valid (last_name
, email
, company_name
or uid
).
The naming of the fields must be no different from the main guest (ex: last_name
and not partner_last_name
).
Option
Type value
Example value
Details
default_nb
Integer
1
The number of accompanying people blocks that will be displayed by default when the page loads
guest_category_id
String
"50d334f9230b43daa6000007"
Accompagnying person's guest category ID
add
Integer
0
or 1
Display a button to add an accompanying person
remove
Integer
0
or 1
Display a button to remove an accompanying person
add_label
String
"Add an accompanying person"
The add button label
remove_label
String
"Remove this accompanying person"
The remove button label
limit
Integer
4
The max number of accompanying people you can add
Payment
The Eventmaker registration form can be coupled with a payment process. You get a cart which you can init with a base price for the guest category, and then you can add a price to some elements in the form.
To set the price of a check-in point, go on its "edit" page and update the base price. The currency used will be the one of the guest category.
Last but not least, you can let the user to choose the payment method. Depending on the value selected, the guest will be redirected to the Ogone payment page. Eventmaker supports Ogone and will soon support Paypal.
There is also a tag which can generate the options based on what is configurate into the category.
You can make it required or add a pre-selected value from this list: check, bank_transfer, cash or ogone to the credit card option.
Discount codes
Discount codes can be used in two ways :
As a reduction for one or several products
As an invitation code which allows your guests to register. Only people owning a code will be able to register.
Both ways can be used together if you don’t want people to register without a code and offer them a discount at the same time.
Option
Type value
Example value
Details
display_capacity
Boolean
true / false
Display the remaining slots for this discount code
display_label
Boolean
true / false
Display discount code label
readonly
Boolean
true / false
A readonly discount code cannot be modified
Displaying errors
It is possible to display a list of errors after the form validation thanks to the guest_errors
variable. When looping through the list, each iteration will produce an array of 2 entries, the first of which contains the key of the error field, the last of which contains the error message.
This would output:
Floats precision and currency
You can handle the precision of floats and choose which currency you want to display after the number with the following tags.
1234.00 €
1234.000
Localization
By default, Eventmaker will show your guests error messages if some of the field don't validate. You can set the locale of your form to en
or fr
. But if for some reason you don't like an error message for a specific field, you can override them like this:
Resend confirmation email
Unique email option must be enabled for either event or guest category. You must add the check_if_registered
option in your guest field email.
Filters
If you need to escape some text to include it in a URL for example, we've added a convenient liquid filter for that :
This will output:
If you need to escape some text to include it in a URL param ( this will escape '&' for example ) :
This will output:
Ajax form submission
You can use some Javascript to asynchronously submit the registration form. Here is some handy sample code:
Editable fields
If you want to help your users to edit contents without editing the HTML code, this is possible by declaring editable fields.
You can add a text box if you want to enlarge the user's possibility
You can also use ckeditor in to help the users add style.
It is also possible to add select fields
When you use many editable fields, it can become difficult to find the one you would like to change. It is then nice to be able to sort them. By default it is a descending order so that you can prioritize new editable fields in front of those that already exist.
Order uid to edit registration
You can use the order uid to edit a guest.
You can use the order uid to display a confirmation message.
You can use the order uid to go to payment page when a payment is required:
Labels
You can add labels to guests like this
and remove like this.
Last updated