API: How to fetch form by unique field instead of form ID?

  • Profile Image
    ehsan_z
    Asked on September 18, 2017 at 04:01 AM

    Hi

    Assume that I have a website where people can submit articles and I use JotForm for that, I also have category model in my system: I create a different form for every category.

    Now I want to integrate those categories (in my system) with forms (JotForm) so I can recognize which form belongs to each category from my system.

    My original idea was to create the form then store its id in category record but I'm looking for something more automated.

    I want to store category id in form metadata, but I figured out jot form doesn't offer that, then I looked at form properties and I found unique field, my question is: how can I fetch form by this unique field?

    I also tried to use hidden field to store category id, but I couldn't use it either to fetch the form or to filter submissions.

    Can you help me?

  • Profile Image
    ashwin_d
    Answered on September 18, 2017 at 05:35 AM

    how can I fetch form by this unique field?

    I am not sure if I have understood your above statement correctly. I did check your account and found that you only have two forms. Do you mean to say that you want to use same form to accept submission across different categories in your website? 

    Yes it is possible to achieve your requirement by taking advantage of a combination of our "URL Parameter" & "Hidden field" feature. You may like to take a look at the following guide which should help you:  https://www.jotform.com/answers/19992-How-Can-I-Differentiate-When-I-Use-the-Same-Form-on-Different-Sites

    Hope this helps.

    Do get back to us if you have any questions or you meant to ask something else.

  • Profile Image
    ashwin_d
    Answered on September 18, 2017 at 08:04 AM

    Your reply was not posed in this forum but I received it in email:

    Hi

    I mean, rather than getting form by its id: curl -X GET "https://api.jotform.com/form/{formID}?apiKey={apiKey}" I want to get it by its unique field.

    Unfortunately no. It is not possible to make API call to get the form by the unique ID value. The only option is to get the form by passing the form ID. 

    If you have further question related to API call, I would suggest you to please send an email to our API team and they should be able to help you:  api@jotform.com