Last updated: 6 months ago

As RSVP addon evolves it get added more and more actions and filters to allow users to customize more and more parts of the addon that was not initially supported. Below are such code snippets. Bare in mind, all these actions and filters may be pasted on functions.php file in your theme.

 

Increase Additional Fields

 

capture

By default RSVP form support upto 5 additional fields on the RSVP form and you can use the below code snippet to increase the max number of additional fields.

 

Add New Additional Field Type

capture

First add the new form field type to the select list. Pay special attention to the field slug name you are going to use. In the below case it is “file”

Next add the HTML to show in the form how this new field type will look. This action receive 3 parameters that can be used to fill the necessary data in the HTML for the field. Also the add_action slug name, pay attention to the last word. “file” which is the same as above slug name you used for the field.

That code should now show a new field – which allow for choosing a file – like in the below RSVP form.

The code below is only required if saving this special field need special data saving steps. By default the field value will be saved to evo-rsvp (RSVP post meta) If you need special saving steps you can use this code.

 

Ready to setup your calendar?

Buy EventON Now