What is JotForm?
JotForm is a free online form builder which helps you create online forms without writing a single line of code. No sign-up required.

At JotForm, we want to make sure that you’re getting the online form builder help that you need. Our friendly customer support team is available 24/7.

We believe that if one user has a question, there could be more users who may have the same question. This is why many of our support forum threads are public and available to be searched and viewed. If you’d like help immediately, feel free to search for a similar question, or submit your question or concern.


  • Profile Image

    Unable to capture form fields with Webhook using JAVA

    Asked by rakeshranjan01 on December 13, 2015 at 02:05 AM

    @POST

    @Path("/regdoc")

    @Consumes(MediaType.APPLICATION_FORM_URLENCODED)

    @Produces(MediaType.TEXT_PLAIN)

    public String registerDoctor( @Context HttpServletRequest request, @FormParam("mobileNumber") String mobileNumber)

    {

    logger.info("Regdoc invoked, Mob Num= "+mobileNumber); return mobileNumber; }

     

    Hello

    We are having a Java REST API in the backend to capture form submissions. However we are unable to capture form fields (mobileNumber as test field). Need help

    Cheers

    Rakesh Ranjan

    Page URL:
    https://form.jotform.me/52942848019463

    webhook post data
  • Profile Image
    JotForm Support

    Answered by Mike on December 13, 2015 at 07:52 AM

    Thank you for contacting us.

    Since you use a webhook instead of standard HTTP Post thank you redirect, the field names may be different. You can try to debug the webhook wth a http://requestb.in/ service. It looks like that the field name should be q15_mobileNumber in your case.

    Send Post Data is not required for our webhooks so you may consider switching it from Yes to No.

    If you need any further assistance, please let us know.

  • Profile Image

    Answered by rakeshranjan01 on December 14, 2015 at 01:59 AM

    Hello

    Thanks for sharing with me the instructions however I am still not able to fetch form field data in the REST service. Below is the code of REST webservice which does get invoked but is unable to fetch form data fields

    @POST

    @Path("/regdoc")

    @Consumes(MediaType.MULTIPART_FORM_DATA) 

    @Produces(MediaType.TEXT_PLAIN)

    public String registerDoctor(@Context HttpServletRequest request,

    @FormParam("q15_mobileNumber") String mobileNumber)

    {

    logger.info("Regdoc invoked, Mob Num= "+mobileNumber);

    return null;

    }

     

    Value of mobile number still remains null. I am not sure if I missing something.

     

    Cheers

    Rakesh

  • Profile Image
    JotForm Support

    Answered by Mike on December 14, 2015 at 09:29 AM

    Sorry, but I am not a programmer to debug your code. You may consider sending an email to api@jotform.com to see if some of our developers can take a look into this.

    We also have some webhook code samples in PHP which can be found on the following article, so you can check them out to get the general idea.

    Webhook Samples

    Thank you.