Toggle menu

Contribute Event - Display Control Snippet

Within the Event article extras it is possible to control settings for bookable events which include:

  • Show/Hide Availability
  • Show/Hide Price
  • Show/Hide Location
  • Show/Hide Dates
  • Sold Out text

Currently these fields are limited to editing within iCM itself. However, by adding the following snippet to your contribute event and update and approval forms where necessary and including the following in your contribute event config end point:

"formToArticleMapping": [{
    "from": "form_SHOWAVAILABILITY",
    "to": "Extension.SHOWAVAILABILITY"
}, {
    "from": "form_SHOWDATES",
    "to": "Extension.SHOWDATES"
}, {
    "from": "form_SHOWLOCATION",
    "to": "Extension.SHOWLOCATION"
}, {
    "from": "form_SHOWPRICES",
    "to": "Extension.SHOWPRICES"
}, {
    "from": "form_NOAVAILABILITY",
    "to": "Extension.NOAVAILABILITY"
}]
and:

"articleToFormMapping": [{
    "from": "Extension.SHOWAVAILABILITY",
    "to": "form_SHOWAVAILABILITY"
}, {
    "from": "Extension.SHOWDATES",
    "to": "form_SHOWDATES"
}, {
    "from": "Extension.SHOWLOCATION",
    "to": "form_SHOWLOCATION"
}, {
    "from": "Extension.SHOWPRICES",
    "to": "form_SHOWPRICES"
}, {
    "from": "Extension.NOAVAILABILITY",
    "to": "form_NOAVAILABILITY"
}],

WARNING: Please make sure if you add these values to your end point, these fields must also be present on your contribute event form otherwise contribute will not function. You do not have to display the fields in each instance if you don't want to, but they must be present.

As always with Contribute, please take your own copies of the forms to support this and avoid a product update overriding this custom extension.

DependenciesGOSS Contribute/Events/Bookings products
ContributorsAndy Orchard
DocsContributing Events
Last modified on January 08, 2024

Share this page

Facebook icon Twitter icon email icon

Print

print icon