Can the spreadsheet to form field be updated via API call?

  • good360_forms
    Asked on May 1, 2024 at 10:05 AM

    Can the spreadsheet to form field be updated via API call? I can get the field definition with a GET call but I am not sure how a POST or PUT would look like to update that spreadsheet file. Can I use that "spreadsheet" parameter? (anything marked <removed> was my edits)

    "22": {

                "apiKey": "<removed>",

                "autofillByCondition": "",

                "boxAlign": "Left",

                "builderDescription": "",

                "cfname": "Spreadsheet to form",

                "codeColumn": "A",

                "customCSS": "",

                "excel": "undefined",

                "fieldParameters": "[{\"default\":\"\",\"parentID\":\"<removed>\",\"name\":\"excel\",\"order\":\"0\",\"filehookURL\":\"https:\\/\\/prepopulator.jotform.io\\/widget\\/server.php\",\"readable\":\"Spreadsheet file\",\"type\":\"fileupload\",\"tip\":\"Upload the spreadsheet file, preferably non-csv sheets. Remember that the bigger the file the longer it loads the data to form.\",\"uploadType\":\"single\",\"fileTypes\":\"\",\"paramStatus\":\"enabled\"},{\"default\":\"A\",\"parentID\":\"<removed>\",\"name\":\"codeColumn\",\"order\":\"1\",\"filehookURL\":\"https:\\/\\/prepopulator.jotform.io\\/widget\\/server.php\",\"readable\":\"Access code column\",\"type\":\"text\",\"tip\":\"The access code column index. This will help identify each data row you want to appear on the form.\",\"uploadType\":\"single\",\"fileTypes\":\"\",\"paramStatus\":\"enabled\"},{\"default\":\"1\",\"parentID\":\"<removed>\",\"name\":\"labelsRow\",\"order\":\"2\",\"filehookURL\":\"https:\\/\\/prepopulator.jotform.io\\/widget\\/server.php\",\"readable\":\"Labels row\",\"type\":\"text\",\"tip\":\"The column labels row number. This will identify each column label and fill in the exact question label from your form.\",\"uploadType\":\"single\",\"fileTypes\":\"\",\"paramStatus\":\"enabled\"},{\"default\":\"Auto Complete Fields\",\"parentID\":\"<removed>\",\"name\":\"fillBtnText\",\"order\":\"3\",\"filehookURL\":\"https:\\/\\/prepopulator.jotform.io\\/widget\\/server.php\",\"readable\":\"Fill button text\",\"type\":\"text\",\"tip\":\"Change the button text to start filling the fields from the spreadsheet file.\",\"uploadType\":\"single\",\"fileTypes\":\"\",\"paramStatus\":\"enabled\"},{\"default\":\"Loading...\",\"parentID\":\"591dafece4a223da050009fa\",\"name\":\"loadingText\",\"order\":\"4\",\"filehookURL\":\"https:\\/\\/prepopulator.jotform.io\\/widget\\/server.php\",\"readable\":\"Loading text\",\"type\":\"text\",\"tip\":\"Set the loading text when the widget start to process the access code to get the spreadsheet row data.\",\"uploadType\":\"single\",\"fileTypes\":\"\",\"paramStatus\":\"enabled\"},{\"order\":\"5\",\"parentID\":\"591dafece4a223da050009fa\",\"name\":\"validCodeTxt\",\"readable\":\"Valid code text\",\"type\":\"text\",\"default\":\"Fields have been auto filled.\",\"tip\":\"Set the text when the widget found the access code and the fields have been auto filled.\",\"paramStatus\":\"enabled\"},{\"order\":\"6\",\"parentID\":\"<removed>\",\"name\":\"invalidCodeTxt\",\"readable\":\"Invalid code text\",\"type\":\"text\",\"default\":\"Unknown access code\",\"tip\":\"Set the text when the widget couldn't found the access code given.\",\"paramStatus\":\"enabled\"},{\"default\":\"No\",\"parentID\":\"<removed>\",\"name\":\"submitInput\",\"order\":\"7\",\"readable\":\"Submit Input Field value\",\"type\":\"dropdown\",\"tip\":\"Whether to include the value of the input field to submission.\",\"options\":\"No,Yes\",\"paramStatus\":\"enabled\"},{\"default\":\"\",\"parentID\":\"<removed>\",\"name\":\"resetInvalid\",\"order\":\"8\",\"readable\":\"Reset fields when Invalid\",\"type\":\"radio\",\"tip\":\"Reset the fields when the access code given is invalid.\",\"options\":\"Yes,No\",\"paramStatus\":\"enabled\"}]",

                "fillBtnText": "Lookup",

                "finalSrc": "https://prepopulator.jotform.io",

                "frameHeight": "80",

                "frameSrc": "https://prepopulator.jotform.io",

                "frameWidth": "230",

                "hide": "",

                "inlineEditDefaultValue": "Type a question",

                "invalidCodeTxt": "Invalid DC Code",

                "isPaymentStoreInBasicFields": false,

                "label": "Yes",

                "labelAlign": "Auto",

                "labelsRow": "1",

                "loadingText": "Searching for location.....",

                "maxWidth": "587",

                "name": "airportlocationCode22",

                "order": "3",

                "paramChunks": "",

                "qid": "22",

                "required": "Yes",

                "resetInvalid": "",

                "selectedField": "<removed>",

                "settingNames": "spreadsheet,excel,codeColumn,labelsRow,fillBtnText,loadingText,validCodeTxt,invalidCodeTxt,submitInput,autofillByCondition,resetInvalid,hide,apiKey,customCSS",

                "settingNamesCSS": "",

                "shrink": "Yes",

                "spreadsheet": "",

                "static": "No",

                "submitInput": "No",

                "text": "3 Letter DC Code",

                "type": "control_widget",

                "validCodeTxt": "Your location/partner has been found.",

                "widgetTabs": "[[\"general\",\"settingNames\"],[\"customcss\",\"settingNamesCSS\"]]",

                "widgetType": "field"

  • Kyle JotForm Support
    Replied on May 1, 2024 at 10:09 AM

    Hi Stephane,

    Thanks for reaching out to Jotform Support. Spreadsheet to Form widget allows you to upload an external spreadsheet to your form and use the values on the spreadsheet to prepopulate your form. However, it does not appear that the Jotform API provides a direct way to update the spreadsheet file associated with the Spreadsheet to Form widget.

    The “spreadsheet” parameter you mentioned is a part of the widget’s configuration, specifically for the file upload field. It’s used to upload the spreadsheet file that will be used to prepopulate the form. This parameter might not be directly accessible or modifiable via the API.

    If you need to update the spreadsheet data frequently, you might consider a different approach, such as using a database to store your data and a server-side script to update the form fields. This would require more advanced programming and knowledge of Jotform’s API.

    Reach out again if there’s anything else we can help you with.

 
Your Answer