Widget Multiple Text Fields:Pass data from our database using API

  • Profile Image
    Asked on April 12, 2018 at 02:24 PM

    Is it possible to use the "multiple fields text" widget to pass multiple fields of data from our data base to JotForm by using the API? 

    For example, we have a form: https://www.jotform.com/build/80914559150155

    We're trying to pass transaction date, transaction number, customer name and store name to the multiple fields text widget, but how do we assign unique field names to each field within the widget? In our example, the entire widget is fieldID #input_3, so when we feed data to the form, it only captures the last field that we're sending. Is it possible to feed multiple fields of data to this widget through the API?

    Here's the snippet of code we're using to pass data to the form, but it only populates demo phone on the submission:

    lcJsonText = "{"

    lcJsonText = lcJsonText + '"3":"'+"0000"+'"'

    lcJsonText = lcJsonText + ',"3":"'+"DEMO ADDRESS"+'"'

    lcJsonText = lcJsonText + ',"3":"'+"DEMO CITY"+'"'

    lcJsonText = lcJsonText + ',"3":"'+"DEMO STATE"+'"'

    lcJsonText = lcJsonText + ',"3":"'+"DEMO ZIP"+'"'

    lcJsonText = lcJsonText + ',"3":"'+"DEMO PHONE"+'"'

    lcJsonText = lcJsonText + "}"

  • Profile Image
    Answered on April 12, 2018 at 03:14 PM

    It seems that the multiple text fields is using some sort of array setup. Kindly try to assign a value to the first field as "#input0" then the second field would be "#input1" ,continue until you have the last field as #input5.

    Let us know how it goes.

  • Profile Image
    Answered on April 12, 2018 at 05:42 PM

    How can I assign a value? I've tried renaming the field ID's to #input0, #input1, etc., but I don't have the ability to edit this field. Am I in the wrong place? From the JotForm editor, I'm clicking on the properties icon, then going to advanced > field details. Is that where I need to rename the field ID's?

    1523569339Screen Shot 2018-04-12 at 4.40

  • Profile Image
    Answered on April 12, 2018 at 08:00 PM

    ...Am I in the wrong place?

    Yes. The field ID details of field properties is not editable. That section is for info use only.

    User guide: How to Find Field IDs and Names

    If I understand correctly, you want to pass field value to another field in the form. You can follow the method described in the user guide: How to Pass Field Value to Another Field?

    Let us know if you need further assistance.