Forum
Blocks: Using related field type inside a block
Hello,
Another bug with blocks - using a perch:related field type inside a block the "Selectize" UI doesn't initialise so we're presented with a simple html multi-select. Would be goo to have this fully operational inside blocks!
Thanks
Ok, interesting. What's the scenario where it would make sense to create a relationship inside a block.
I'm building a "content builder" style default page for an editor to add content to. Sometimes it's useful for an editor to add a related event or course to a page, sometimes multiple events and courses. Along with normal text/heading blocks, and figures (images, videos etc). I don't want all the selected events to appear in one big list, but give them flexability to add one related event (perhaps related to the paragraph they just wrote), then add another text block, or image, then perhaps add a related course, and to allow them to reorder the blocks. I'm currently setting a limit of 1 on the related tag to force the editor to create a new block when they want to add another related item.
Hmm, ok, that makes sense. Thank you. I'll take a look at it and see what I can do.
The template code I'm using is basically this with a some extra html, in case it's useful:
Thanks.