Events Module Sign Up Form Error "Can't Parse Allocation Field"

Hello

I’m building an events page + sign-up form for events. I had no issue building the events list + detail pages.

Here’s where I ran into an issue. I built the form using Treepl Forms and then created an event registration form for users. Per the Treepl docs (https://docs.treepl.co/content-modules/events#secModuleItemPayments), I changed the form type to "Single item (for payment collection against paid events).

Here is my form code:

Note: I’m using javascript to force the event id into the “EventId” input (this used to be an issue, this fixed it for me). So this doesn’t look like where the problem is coming from.

Here is the error code I get when I submit the form:

PS, im also not able to add form submission data (like the event details or user details to the autoresponder email:

Any help would be greatly appreciated!

Thanks!

  • Malek F

Hi @malekf
Looks like the ‘Allocation’ field (number of seats) might be missing from your form or has no value entered.

Check your form code for this field:

<label for="ItemsQuantity">Allocation</label>
<input type="text" data-event_one_item_price="{{this.paymentAmount}}" name="Payment_ItemQuantity" value="1"/>

Usually, if you are getting form errors, it’s a good idea to reset your form layout back to default (take a copy of your edited form code for backup) and see if the form works correctly as such. If so, compare the fields, checking if any are missing or incorrectly formatted.
This is particularly true for payment forms as there are several required payment details needed - so double-check your payment fields also if needed.

Regarding the autoresponder; you should be able to access all the submitted data using the formSubmissionData object ( {{ formSubmissionData }} object ).
However, the Event details are not captured in the form unless you create specific custom fields to capture them. Or, alternatively, since it looks like you are capturing the Event ID in a custom field, you can use that to call the specific Event item again in full, in your autoresponder email layout and push it to a Liquid collection.
Something like this:

{% component type: "module", source: "Event", layout: "", filterBy: "id", filterValue: "{{this.formSubmissionData.fields.custom.eventid.value}}", collectionVariable: "MyEvent" %}

and then access the Liquid collection like so:

{{MyEvent.items[0].name}}
{{MyEvent.items[0].url}}
{{MyEvent.items[0].EventDateStart}}
etc...

PS: You should be able to populate the Event ID into your form like so: {{this.parent.id}}.
This applies to any Event item data, eg: {{this.parent.name}}… (assuming your rego form is in your Event’s detail layout).

Let us know if you need further help with any of this.

1 Like

Awesome! This fixed the issue.

Thanks Adam :slight_smile: