Hello, is it possible to create a form programmatically through some object or an array input?
Hello, is it possible to create a form programmatically through some object or an array input?
Yes, you can. It is a two step process. First you need to create the form record, then create the meta (which contains the meat of the form). See below:
//creating new form
$title = "My new form title";
$new_id = self::insert_form($title);
Now you need to create your form meta array. To learn how this array should be created, you can use one of the Hooks and print the $form object (i.e. print_r($form) ), or you can refer to our Form Object documentation page
$meta = array(......);
//create form meta
self::update_form_meta($new_id, $meta);
Thanks, this would be useful. I realized that I could do custom XML import. I would really appreciate if there is a markup (or some more API documentation) for this because sometimes it's quiet dirty work to build up complex form in admin.