I haven’t tested it, but, I believe the reason you are seeing only 1/3 fields is its looping over and registering a non-unique connector class and overriding the previous one.
In general, for the client side, rather than looping through the custom fields and declaring the api methods. I suggest you define components for each field separately, or at least separate actions as you’ll probably need to have different logic associated with each field?
The only portion I would loop over and declare is this:
But I’m just guessing what to do here and then add the rest of the Discourse stuff. The example above is to use a field for coordinates. I intent to use the g.json to create a map based on the group metadata.
I also intend to add a checkbox for emailing the group with a mail setup for that group.
However, this field is best placed in the interaction tab. How to know what to do to get it there? I would like to become more proficient with this. But I get the idea that this information is just in the code, not documented somewhere. Which is probably fine, but just takes more time and effort to find what I’m looking for. Although what I want to add is quite small, just a few fields to the groups
I’ve been considering running a free course in discourse plugin development, which is essentially what you need. I’ve already written the course materials for a course in theme development (see below). If 30 people vote for one in plugin development I’ll write a give a course (via zoom) in it.
Write and give course in plugin development
Don’t write and give a course in plugin development
Awesome! I actually will use a fork of this Fairphone community map. They use the raw YAML output of a topic. I’ve modified my fork to use the data from g.json to draw markers on the map. I just miss a few fields such as coordinates and a boolean to use an email address in the map. Maybe some more, but first I’ll need to know how things work. Thanks for the links! Will have a look this week and see how far I’ll get. A course would be awesome too! My JS/Ruby skills are now though. Mainly Python/Bash and some crumbs from other language’s.
Did you change anything else from the example? The example works. Try starting with the example itself. If that’s also failing in your environment, then something else is going on. If the example works in your environment, then progressively work through the changes you made until you find the one that’s breaking it.