So I’m developing a plugin that will allow a person to generate a <form>
using the standard blueprint structure, but inside a textarea field (so it’s an extension of kirbytext). Let’s say I’ve developed the code to extract the following from the content
Form:
callback: registration
success: You rock!
fields:
fname:
label: First Name
type: text
required: true
lname:
label: Last Name
type: text
required: true
email:
label: Email
type: email
required: true
tel:
label: Phone
type: tel
My question is this: Is there a function in the Kirby toolkit that can convert the above structure (the structure of blueprints) into an array or object, so I don’t have to write my own parsing function? Because that would turn a 12 hour project into 1.