Global attendees fields

Docs > Customise & Extend

Heads up: This article assume that you are comfortable with opening files on the server and editing them.

For each event, you can add an unlimited number of questions that will be asked for each attendee. However, if you want to set some fields set that will be appended to the event automatically, you will need to do the following:

  1. Open this file: /administrator/components/com_ohanah/config.json
  2. Since this is the file created by PHP, it's not formatted nicely, so you may want to reformat it before you proceed. Just google "Online JSON formatter" and you will get a plethora of options. 
  3. Find the part that looks like this
    "fields": [],
  4. That is an array of fields. You can add as many as you want. Bellow is an example of 3 additional fields, with their types. You can copy/paste this example in your JSON file to test it.
    "fields": [
          "editable": true,
          "element": "text",
          "label": "Maiden name",
          "placeholder": "Maiden name",
          "property": "maiden_name",
          "required": false
          "editable": true,
          "element": "listbox",
          "label": "Number of additional guests",
          "options": "One\r\nTwo\r\nThree\r\nMore than three",
          "required": true,
          "property": "number_of_additional_guests"
          "editable": true,
          "element": "checklist",
          "label": "I want to participate in",
          "options": "Singing\r\nDancing\r\nCrafting\r\nCooking",
          "property": "i_want_to_participate_in"
  5. After saving config.json, create a new event. You should see these fields automatically appended to preconfigured fields.
    Image title

Field explanations:

  • editable - if set to false, field cannot be removed via UI (no delete button)
  • element - type of the field. Possible options are "text" for text field, "listbox" for dropdown and "checklist" for collection of checkboxes.
  • label - Label of the field
  • options - Options for listbox and for checklist separated with new line (\r\n). If you need to use double quotes in there, escape it with slash (\")
  • property - the name of the field
  • required - if set to true, it will not be possible to save attendees details without setting it. If the field is type "checklist" this field is ignored, a checklist is never required.
  • placeholder - only used in the text field to set the placeholder