Is the a way to add the variable code in the questions | Community
Skip to main content
Answered

Is the a way to add the variable code in the questions

  • February 22, 2022
  • 2 replies
  • 82 views

So when user finishes the form, we get a payload like this 

{
    "event_id": "",
    "event_type": "form_response",
    "form_response": {
        "form_id": "",
        "token": "",
        "landed_at": "",
        "submitted_at": "",
        "hidden": {
            "email": "",
            "uuid": ""
        },
        "definition": {
            "id": "",
            "title": "User Sign-Up",
            "fields": [
                {
                    "id": "",
                    "title": "Great, can we get your full name?",
                    "type": "short_text",
                    "ref": "",
                    "properties": {}
                },
                {
                    "id": "",
                    "title": "Company Type:",
                    "type": "multiple_choice",
                    "allow_other_choice": true,
                    "ref": "9aaaeeebe70858c4",
                    "properties": {},
                    "choices": [
                        {
                            "id": "XQFP1gfHQ6rM",
                            "label": "Startup"
                        },
                        {
                            "id": "KrJvEaAXRNCQ",
                            "label": "Devshop"
                        },
                        {
                            "id": "zjOVcAj5Ua13",
                            "label": "Enterprise"
                        },
                        {
                            "id": "pHtQgmfwF4Va",
                            "label": "Freelance"
                        }
                    ]
                },
                {
                    "id": "",
                    "title": "Role:",
                    "type": "multiple_choice",
                    "allow_other_choice": true,
                    "ref": "7207397713e2b5e3",
                    "properties": {},
                    "choices": [
                        {
                            "id": "3VfNPhSjMeJW",
                            "label": "Product Designer"
                        },
                        {
                            "id": "p0jUbkKt4hgZ",
                            "label": "Developer"
                        },
                        {
                            "id": "NpGdcyLYS22o",
                            "label": "Product Manager"
                        },
                        {
                            "id": "LQdXhn16njKb",
                            "label": "Team Leader"
                        }
                    ]
                },
                {
                    "id": "RgytThByK0yO",
                    "title": "Purpose of using Nest",
                    "type": "long_text",
                    "ref": "18842abd9aa9ded4",
                    "properties": {}
                }
            ]
        },
        "answers": [
            {
                "type": "text",
                "text": "",
                "field": {
                    "id": "C0DME1QGAUxh",
                    "type": "short_text",
                    "ref": "ef34b985c51e4131"
                }
            },
            {
                "type": "choice",
                "choice": {
                    "label": ""
                },
                "field": {
                    "id": "ZVZHdZ4pB4DJ",
                    "type": "multiple_choice",
                    "ref": "9aaaeeebe70858c4"
                }
            },
            {
                "type": "choice",
                "choice": {
                    "label": ""
                },
                "field": {
                    "id": "NQYmmuE8TifK",
                    "type": "multiple_choice",
                    "ref": "7207397713e2b5e3"
                }
            },
            {
                "type": "text",
                "text": "",
                "field": {
                    "id": "RgytThByK0yO",
                    "type": "long_text",
                    "ref": "18842abd9aa9ded4"
                }
            }
        ]
    }
}

Is there a way do add a variable on the question or the answer???

For example this is one of the questions
{
                    "id": "",
                    "title": "Great, can we get your full name?",
                    "type": "short_text",
                    "ref": "",
                    "properties": {}
}

and I want to do this (or the answers )
{
                    "id": "",
                    "title": "Great, can we get your full name?",
                    "type": "short_text",
                    "ref": "",
                    "properties": {}

                    “question”:”user_full_name”
}

So it could be a bit easier for me to get the values and answer

Best answer by mathio-tf

I think I have a deja vu 😃 

 

View original

2 replies

Gabi Amaral
Ex–Typefomer
Forum|alt.badge.img+5
  • Ex–Typefomer
  • 1777 replies
  • February 23, 2022

Hello @AaronMendez15! Welcome to our Community! :wave_tone2:

I'm tagging @mathio on this topic since I believe he'd be the best person to help you with your question. 

Wishing you all the best! :blue_heart:


mathio-tf
Typeform
Forum|alt.badge.img+5
  • Typeform
  • 888 replies
  • Answer
  • February 23, 2022

Reply