What is JotForm?
JotForm is a free online form builder which helps you create online forms without writing a single line of code. No sign-up required.

At JotForm, we want to make sure that you’re getting the online form builder help that you need. Our friendly customer support team is available 24/7.

We believe that if one user has a question, there could be more users who may have the same question. This is why many of our support forum threads are public and available to be searched and viewed. If you’d like help immediately, feel free to search for a similar question, or submit your question or concern.


  • Profile Image

    Create new form (from API) based on existing form

    Asked by AmSteve on November 21, 2015 at 08:49 PM

    When I use the Rest API (

    https://api.jotform.com/form/{formID}/questions?apiKey={apiKey)

    to get an existing form I'm given a Json string where a collection of form controls are shown as (for example a control_hidden):

            "18": {
                "browserInfo": "No",
                "explicitySetByUser": "Yes",
                "name": "webinarid18",
                "order": "4",
                "qid": "18",
                "text": "WebinarID",
                "type": "control_hidden"
            }

    Because the form was created by the GUI it has not-pretty values for the 'name' property. I want to create a new from (not a Clone) where the only property i'm changed (from the existing) is the name property.

    I would like to use the output of the above GET statement, make the minor corrections to name prop, and the use that Json with the form/PUT method to create a new form with the updated field names. But it appears that the Questions: object is not the same for creating a form as opposed to what output by the GET.

    I've tried pasting:

    {"questions":[{
            "2": {
                "buttonAlign": "Center",
                "buttonStyle": "None",
                "clear": "No",
                "clearText": "Clear Form",
                "encryptIcon": "No",
                "name": "submit",
                "order": "14",
                "print": "No",
                "printText": "Print Form",
                "qid": "2",
                "text": "Submit",
                "type": "control_button"
            },
    ...

       }
    ]}
     "https://api.jotform.com/user/forms?apiKey=48618da72289962efebfa4b91cb780a5"
    }

     

    to your sandbox and gotten a

    : "Bad request (/user-forms) - JSON error"


    So I used http://www.jsoneditoronline.org/ to inspect the output of your http://api.jotform.com/docs/#put-forms sample and realized that I just need to delete the iterator from the list of questions. Where:

            "2": {
                "buttonAlign": "Center",
                "buttonStyle": "None",
                "clear": "No",
    ...

               "type": "control_button"
            },

    becomes:

            {
                "buttonAlign": "Center",
                "buttonStyle": "None",
                "clear": "No",
    ...

                "type": "control_button"
            },

     

    and stuff just works.

     

    Looks like you guys have turned in a very well behaved API. Kudos.

     

     

     

     

    create new form api
  • Profile Image
    JotForm Support

    Answered by Welvin on November 22, 2015 at 09:28 AM

    Thank you for the feedback. If something is wrong and/or if you need help with our API, you can reach our API Team at api@jotform.com.

    Regards

  • Profile Image

    Answered by AmSteve on November 23, 2015 at 02:01 AM

    Thanks -- I've seen other references to direct contact to api@jotform.com which implies this forum is not considered to be a primary channel to them. Seems counter-intuitive that questions here don't get handled by them.

  • Profile Image
    JotForm Support

    Answered by Charlie on November 23, 2015 at 03:02 AM

    There are cases that we can answer some API questions here in the forum, however, for cases that might need more detailed and comprehensive answer, it would best to contact the API team on their direct email address. We also have a separate forum page for developers to discuss things about our API, you can check it here: http://developers.jotform.com/forum.

    Thank you.

  • Profile Image

    Answered by AmSteve on November 24, 2015 at 07:22 PM

    Thanks much for the link to the developer form -- it sort of re-inforces a point i've made either in this thread or another recent -- the visibility to developer-specific topics for the site is lacking. there's got to be room in your menuset for the link you've just posted me.

  • Profile Image
    JotForm Support

    Answered by Kevin_G on November 24, 2015 at 10:52 PM

    Hi,

    As explained by my collegues above, this thread requires a detailed explanation related to our API,if you have posted your questions in the API Forum they will reply you as soon as possible.

    Let us know if you have questions related to our Form Builder, we will be glad to assist you.

    Regards.