Jump to content

Create Inputfields from JSON array


blynx
 Share

Recommended Posts

Hi,

is there actually a function in Processwire to create forms from a JSON array with corresponding attributes, so that something like

{
  "title":"Duck Count",
  "type": "InputfieldInteger",
  "label": "How many ducks?"
},{
  etc ...
}

would become a form with all the fields?

Otherwise it would be a nice-to-have I guess?

I will give it a try for a module now - could be enhanced then. Or has anyone already build something like that?

cheers,

Steffen

Link to comment
Share on other sites

Cool, thanks - I will have a look into this!

I am building a module with quite some settings and with such a function i could handle all the data just in one place since the forms will be auto-generated.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...