PLEASE NOTE: These forums are no longer utilized and are provided as an archive for informational purposes only. All support issues will be handled via email using our support ticket system. For more detailed information on this change, please see this blog post.

Create form programmatically

  1. Hello, is it possible to create a form programmatically through some object or an array input?

    Posted 13 years ago on Thursday May 5, 2011 | Permalink
  2. 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);
    Posted 13 years ago on Sunday May 8, 2011 | Permalink
  3. 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.

    Posted 13 years ago on Sunday May 8, 2011 | Permalink

This topic has been resolved and has been closed to new replies.