API to change Heading Element Subtext

  • Greenfield_Josh
    Asked on June 4, 2023 at 11:57 AM

    Hi,

    I am using an API to edit a form, but I only see the ability to edit a heading element's header and not the subheader/subtext. I am using question[text]=New Text and https://api.jotform.com/form/{formID}/question/{questionID}?apiKey={apiKey}

    please advise on how to edit the subtext/subheader with an API.


    Thank you,

    Josh

  • Sweta JotForm Support
    Replied on June 5, 2023 at 7:38 AM

    Hi Greenfield_Josh,

    Thanks for reaching out to Jotform Support. You can use the following subheading property to enter the sub-heading text:

    questions[0][subHeader]=" This is a sub Heading"

    API to change Heading Element Subtext Image 1 Screenshot 20

    Give it a try and let us know if you need any help.


  • Greenfield_Josh
    Replied on June 5, 2023 at 6:14 PM

    Hi Sweta,


    Thank you for your response. It doesn't seem to be working for me. I am using make.com to create my api and have added question[text] as the name of a Query string and have had success. But when I added questions[0][subHeader] as query string name, I am getting error with status code 404. the HTTP curl i am using is https://api.jotform.com/form/{FormID}/question/6?

    Let me know if you can help please

  • Felizio JotForm Support
    Replied on June 6, 2023 at 3:07 AM

    Hi Josh,

    Thanks for reaching out to Jotform Support. I've tested some API requests for you and found out that you can use the key below to change the sublabel of a field on your form.

    questions[subLabel]

    API to change Heading Element Subtext Image 1 Screenshot 30

    After sending the request, the sublabel of the field changed as you can see in the screenshot below:

    API to change Heading Element Subtext Image 2 Screenshot 41

    Give it a try and let us know how it goes.