I'm currently trying toolset as a low code system to help me build faster web apps. I want to know if I can extend the Extra elements in forms / CRED with custom code.
I would like to have a HTML wrapper element. It should have a content space like Conditional Group where I can drag and drop fields and two textareas: "Before content" and "After content" where I can put custom HTML. This would be helpful for putting fields in rows & cols.
I know I can do this with multiple HTML content fields but this gets messy pretty quickly. And I'm aware that I could switch to expert mode and write my own html code.
But I want to know the API and possibilities to extend CRED. I'm sure I will have more problems in future that could be fixed with a custom Extra element.
Looking forward hearing from you,
Sean
Hi, right now there's no public API for extending Forms' available elements, but I can ask our developers if that's something we plan on adding in the future or something we can take on as a feature request. Let me know if you'd like me to raise that in our next developer meeting.
In the meantime, as you said using expert mode is one possible workaround. Another workaround in drag-and-drop mode is to use a custom HTML block that contains your custom HTML code, and insert the desired Forms field shortcodes within that HTML code. You can find documentation for those shortcodes here: https://toolset.com/documentation/programmer-reference/forms/cred-shortcodes/
Or you could create another similar Form in drag-and-drop mode in a separate browser tab, switch to the expert mode, copy the shortcodes you need, then tab back to the original Form, and paste those copied shortcodes into custom HTML block(s). That experience, while a bit disjointed, might help speed things up while working in the drag-and-drop mode in lieu of a public API for extending those blocks.
Hey Christan,
thank you for your quick response.
Yes, it would be great if you could ask the developers if they plan an public API for that. While you are at it, can you ask why the form builder is not based on Gutenberg? It seems to me that would solve many problems while designing a form in the (limited) form builder. Just curious about the design decision 🙂
Thanks for the alternative ideas. These are good workaround I didn't think about. Thank you 🙂
Sure, I'll ask about the API and give you an update when I have more information.
As far as why Forms builder is not based on Gutenberg, as I recall the drag-and-drop Form builder project began before the Gutenberg editor was mature enough to handle the layouts and features we wanted to allow. A custom builder experience was necessary, and we haven't reworked the builder (yet) to integrate with the block editor. I'll ask if that's on the roadmap.
This makes sense.
Yes, it would be amazing if you can ask if Gutenberg is on their roadmap.
Thank you in advance.
Our developers have informed me that while Form builder integration with Gutenberg is on the long-term roadmap, Form blocks extension API is not at the moment. If more Users request this feature, we will consider reevaluating the need for an API to extend those blocks. For now, one of the workarounds is required to implement the features you have described. Thanks for letting us know how you use the Form builder and how you'd like to improve it.
Thank you for your reply. Nice, that Gutenberg is on the roadmap 🙂
Just a quick question: Are we talking about months or years when we speak about "long-term"?
Thank you for your support 🙂
I can't say for sure, but it's a relatively low priority project and the schedule for long-term road map features isn't yet solidified. I can say confidently that the Gutenberg integration project is not currently expected to be included in the next couple of development cycles, so it will not be ready within the next 2 or 3 months. Beyond that, it is not clear yet based on the information we have available.
Thanks Christian for your very good support. All questions are resolved now 🙂