Last updated: 6 months ago

This tutorial will guide you to add additional fields to actionUser event submission form. This should help you allow your event submitters to submit additional event data fields that are not supported in the default form. You will require actionUser addon version 2.0 and up to do the below additions.

I will try to guide you through the parts of code that is necessary for this.

Include additional fields in actionUser form fields section

In the array the field name we use “evotest” will be the identifier. Values inside the array are Field name, parameter, parameter, field type. Above code will give you below result.

Capture

First action hook we echo the HTML fields for the additional field we created evotest. So we are going to collect yes or no value for “Test Input Field” which has a parameter name evoau_test_value I am using the evo_helper() class and using the html_yesnobtn() function to output a neatly styles yes/no field on event submission form. You can type your own custom HTML in here instead. Moreover you can add more than one fields inside evoautest_fields() function.

Next is where we save the values — from evoautest_save_values() function. You can see our input field evoau_test_value is inside the foreach array. If you decide to show more than one fields on event submission form be sure to add all the field parameter names inside this array so each of those values can be saved.

Also for the label text for our additional data field we are using evo_lang_get() function with a parameter name that is associated with that text string in EventON Language — which is explained below.

The above codes will show new yes no field in the event submission form.

Capture

 

Alternative File Upload Field

The below code snippet allow you to add a upload file field to actionUser submission field.

In this example we are enabling user to upload only PDF file with the event submission form. During the submission process we upload the file into wordpress system and save the attachment ID into event post meta (var name: pdf_file)

 

Optional Translation

This next part is optional. It is for including the label text we used in our additional field to show in eventon> language settings so it can be translated easily.

 

Ready to setup your calendar?

Buy EventON Now