¿Cómo crear una conexión a través de la API de Jotform a mi base de datos?

  • GISSELA LIZBETH RAMIREZ RECALDE
    Fecha de consulta 11 de septiembre de 2024, 14:49

    Buenas, quisiera saber como puedo hacer la conexión por API, a mi base de datos , por ejemplo ingreso un cedula y me saque los datos de la misma, y mostrar en el mismo formulario

  • Kyle Jotform Support
    Fecha de respuesta 11 de septiembre de 2024, 17:37

    Hi Gissela,

    Thanks for reaching out to Jotform Support. Unfortunately, our Spanish Support agents are busy helping other Jotform users at the moment. I'll try to help you in English using Google Translate, but you can reply in whichever language you feel comfortable using. Or, if you'd rather have support in Spanish, let us know and we can have them do that. But, keep in mind that you'd have to wait until they're available again.

    Now, let me help you with your question. To connect to your database via API and retrieve data based on an ID. Let me show you how:

    Generate an API Key:

    • Visit Account API and select Create New Key.¿Cómo crear una conexión a través de la API de Jotform a mi base de datos? Image 1 Screenshot 60
    • Input your new API key’s name and your desired label.¿Cómo crear una conexión a través de la API de Jotform a mi base de datos? Image 2 Screenshot 71
    • Modify your API key’s permission to Full Access.¿Cómo crear una conexión a través de la API de Jotform a mi base de datos? Image 3 Screenshot 82

    Make sure thatyour database is set up to store and retrieve the necessary data.

    Then, you need to create your PHP Script to handle the connection to your database and fetch the data based on the ID entered in the form. We have a guide that you can check out here

    Set Up a Webhook in your form:

    • On your Form Builder, click on Settings and select Integrations.
    • Select Webhooks, enter the URL of your PHP script, select Complete Integration, and click Finish.

    ¿Cómo crear una conexión a través de la API de Jotform a mi base de datos? Image 4 Screenshot 93

    Then, use the Jotform API to fetch the data and display it in your form. This setup will allow you to enter an ID in your Jotform, fetch the corresponding data from your database, and display it in the form.

    ¿Cómo crear una conexión a través de la API de Jotform a mi base de datos? Image 5 Screenshot 104

    We have guides on Jotform API Documentation, How to Send Submissions to Your MySQL Database Using PHP, and How to Send Submission Data via a Webhook

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

Su respuesta