Giter Site home page Giter Site logo

Comments (2)

wzup avatar wzup commented on June 25, 2024

My reply to this wrong answer Answered by Denis on December 20, 2016 at 02:34 AM from this thread .

I don't know who you are, but you do not look like a developer. Because what you say DOES NOT WORK!
Look at screenshot here.

Screenshot 1.
Postman request.
postman 2016-12-21 01 58 54

And the result is this. As you can see it is far from success.
Where are other items? Where are Status 2","Status 3?

123: {
    text: "Status",
    type: "control_checkbox",
    answer: [
        "Status 1"
    ],
    prettyFormat: "Status 1"
},

Case2.
A real life request with nodejs request library.

Again, as you said comma separated without square brackets

    let request_options = {
        method: 'POST',
        url: 'https://api.jotform.com/submission/' + submission_id,
        headers: {
            "APIKEY": api_key,
            "cache-control": "no-cache",
            "accept": "application/json",
        },
        form: {
            "submission[123]": '"Status 1","Status 2","Status 3"',  // comma separated without square brackets
        }
    }

    request(request_options, (err, response, body) => {
        if(err) {
            res.status(500).json({error: err });
        }
        res.status(200).json({body: body });
    })

The result is the same as before, only one item saved:

123: {
    text: "Status",
    type: "control_checkbox",
    answer: [
        "Status 1"
    ],
    prettyFormat: "Status 1"
},

Either your JotForm API doesn't work, or you do not know how it works.

Can anybody qualified enough explain how JotForm API works? What is format of data for such an update request? Jotform API documentation is miserable. So as developers' answers as I can see.

from jotform-api-nodejs.

wzup avatar wzup commented on June 25, 2024

I need you to tell me the following

  1. What are types are (precisely) for key and value pairs?

submission[123]: '"Status 1", "Status 2", "Status 3"'

  1. What type is submission[123]?
  2. What type is 123?
  3. What quotes have to be used? Single or double?
"submission[" + 123 + "]": <- int
"submission[" + '123' + "]": <- str
  1. What type is '"Status 1", "Status 2", "Status 3"'? Array? String?
  2. What is the delimiter? "Status 2", "Status 3" A comma? A semicolon? anything else?

from jotform-api-nodejs.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.