Hey Pavilion team,
Great work on all the Discourse plugins so far!
I just had a question regarding Custom Fields in the Wizard. I created a custom field called event_type
because I want to be able to know if an event will be Hybrid, In-Person, or Online. I was following the instructions here: Action Settings - documentation - Discourse Plugins but I don’t know what field_name
means in topic.field_name
.
I found that in another thread, to make the pavilion discourse-events plugin to work within the Wizard, I’ll need to map topic.event
to the Wizard step & field that has the discourse-events plugin, and it works.
How do I go about mapping event_type
(which is a topic custom field, have tried both string and JSON and have had no luck) to a user’s input from a dropdown selection (Hybrid, In-Person, Online)
Example
When I try to print a topic’s custom_fields in the Landing Pages, I get the following:
{
"preloaded": {
"TopicEventStartsAt": null,
"TopicEventEndsAt": null,
"event_end": null,
"event_rsvp": null,
"event_going": null,
"event_going_max": null,
"location": null,
"accepted_answer_post_id": null,
"event_type": null,
"speaker": null,
"event_all_day": false,
"event_start": 1661751000,
"event_timezone": "",
"event_version": 1
},
"klass_with_custom_fields": "Topic"
}
I attempted the following:
text | wizard field |
---|---|
topic.event_type | Event Setup (step_1_field_2) |
text | wizard field |
---|---|
topic.type | Event Setup (step_1_field_2) |
text | text |
---|---|
topic.event_type | “Hybrid” |
text | text |
---|---|
topic.event_type | Hybrid |
custom field | text |
---|---|
Topic event_type (string) | Event Setup (step_1_field_2) |
Do you have any other suggestions? To complete the circle, just want to confirm I created the custom field correctly as well: It is a: Class - Topic
, Type - String
, Name - event_type
, Serializers -
TLDR:
Ultimately, I’d just like the following to happen for my custom field:
"event_type":"Hybrid",
It works for events but doesn’t for my custom field. How can I get this done?
Thank you!