Is there a method in the API to get the different field ID's?

  • Profile Image
    davem
    Asked on June 29, 2016 at 12:43 PM

    I've got a web app that we are looking to integrate with Jotform, and to make it easier on the users, when they fill out a form like a support request, we would like to pass the username from our system to the form. I've seen where it can be done with the url query, but I was hoping to find a way to get a full list of the ID's so an admin can map fields from our app to the appropriate questions on a form without the risk of mistyping something. 

    Eventually, we would also like to be able to use this to customize the forms on the fly, say with the customers installed applications to a dropdown list on the form. We can handle this with javascript on the client side, but we just need to get those different ID's from the field properties. 

  • Profile Image
    Kevin_G
    Answered on June 29, 2016 at 01:51 PM

    I'm not sure if fully understood your question, but I can see it's possible to get the names of fields in a form with the API, for example, I just have tried with this code: 

    $form = $jotformAPI-> getFormQuestions(61756142981966);

    echo "<pre>";

    print_r($form);

    echo "</pre>";

    I got an array with questions in the form as well as all their data, here is the link to the form that I'm testing: https://form.jotform.com/61756142981966 

    The result is currently looking like this: 

    I think doing this you will be able to get each name of the needed questions in a form, here is a link to our API documentation that may help you with this: http://api.jotform.com/docs/#form-id-questions 

    This link may be helpful as well: http://developers.jotform.com/libraries 

    You can also contact our API team in order to get help directly from our developers, feel free to send them an email here: api@jotform.com