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

    Wrong path (for error sign) in jotform.js when targeting form to own php script

    Asked by hagu on August 11, 2012 at 08:28 AM

    Hello!

    Just replaced the "action=...." target to jotform php submit-script to my own php.

    When nothing is filled out and you press submit the exclamation-octagon.png image gets lost.

    Found out error seems to be in jotform.js in that lines:

    top: '<img src="'+this.url+'images/exclamation-octagon.png" align="bottom" style="margin-right:5px;"> '


    }).insert('<img src="'+this.url+'images/exclamation-octagon.png" align="left" style="margin-right:5px;"> ' + message).insert(

    I´m no expert, but could you make an option to relative this path or point to own / customer image folder an server?

     

    ???Workaround????: I copy the image from http://submit.jotformeu.com/images/exclamation-octagon.png to my own images folder on server and edit the path - right ???

    thanks!

    Screenshot
  • Profile Image

    Answered by hagu on August 11, 2012 at 08:47 AM

    update: no, not working.  replacing +this.url+ with absolute path makes no difference...

    any help or idea?

  • Profile Image
    JotForm Support

    Answered by liyam on August 11, 2012 at 10:54 AM

    Hello, can you please provide us the URL / web page that you're working on so that we can better understand the problem?

    Thanks.

  • Profile Image

    Answered by hagu on August 11, 2012 at 01:56 PM

    Yep, its: http://www.2in2.net/login1.html

    The screenshot above is made under IE9, with FF14 it´s the same but without the "X-Placeholder for wrong image link.

    BTW, similar problem was posted by an user in 7/2010, still unsolved (?)

    here: http://www.jotform.com/answers/4310-Images-not-displayed-on-external-website

    Thanks in advance  for any help, improvement or workaround !!

    p.s. just replace the link to http://submit.jotformeu.com/submit.php with any own php in the html file, you get this effect

  • Profile Image
    JotForm Support

    Answered by jonathan on August 11, 2012 at 08:17 PM

    Hi,

    Unfortunately, modifying the 'form action' to use different PHP code other than the jotform 'Submit.php' will not work easily. For the reason you cannot download submit.php, the submit.php needs also to point to www.jotform.com.

    Please see this thread.. it discusses the submit.php

    As I have checked your page thru the browser console, you will see this code on the 'error image' src when using your own submit.php

     

    But if you look at the jotform submit.php code... it dynamically creates the correct URL path that point to jotform.com and the src image for the 'error image'

     

    If I may suggest, I think it would be better to leave the submit.php as is.
    If you want to redirect your form to another PHP page, you can do so using the redirect thank you page trick. Not only this will eliminate the 'error image' issue, it will not also break the form code.

    Hope this help. Please inform us if you have further inquiry.

    Thanks.

  • Profile Image

    Answered by hagu on August 12, 2012 at 06:26 AM

    Hello Jonathan!

    Thanks a lot so far, to bring a little light for me into this issue.

    Yes, I would love to keep the generated Form untouched, leave the link to jotforms submit php as it is.

     

    What is the "redirect thank you page trick"?

    As far as I see, I only can redirectt he user to my own custom Thankyoupage after submittiting, ok, let it be a php site, but what is with the POST data filled out by the user?

    I think in this case its gone to jotform to send my an email with the data, and then gets lost.

     

    I read the links you gave me, especially this:

    http://www.jotform.com/answers/3412-How-to-download-submit-php

    OK , but now I´m confused, because here, Serkan from jotForm wrote:

    "You are free to use form source however you want. You can point it to your custom php code if you want to.  "

    So, my big question remains:

    How do I get the POST values of the user to my own php script for further work ?

    Beside submitting it to jotform too?

     

    Maybe you will think about adding a new choice to your integration wizard:

    "Send the submissions to your own php script"

    so, what should I do?

     

    Thank you!!

  • Profile Image
    JotForm Support

    Answered by jonathan on August 12, 2012 at 07:32 AM

    Hi,

     

    What is the "redirect thank you page trick"?

    As far as I see, I only can redirectt he user to my own custom Thankyoupage after submittiting, ok, let it be a php site, but what is with the POST data filled out by the user?

    I think you got this already. Yes, you can redirect the submission to your PHP page after the thank you page.

    As for the POST values, please check this guide How-to-Post-Submission-Data-to-Thank-You-Page . I am not a PHP coder or programmer :-), but I think it does exactly what you were looking for...

     

    OK , but now I´m confused, because here, Serkan from jotForm wrote:

    "You are free to use form source however you want. You can point it to your custom php code if you want to.  "

    If I understand correctly, Serkan meant that you can use the form's "source code" (How-to-Download-a-Source-Code-of-your-Form). And as also mentioned, you can "point it" to your custom php code.

    If you have a programmer that knows PHP, it will only a matter of knowledge that the programmer can code the custom "submit.php" As I have said it is just "not" that easy... since you cannot see Jotform's own submit PHP code, the programmer will have to figure it out on his own how it was done by jotform developer's.

    But again, coding your own "submit.php" is rather a daunting task... when you really don't have to, because you can actually achieve the same objective using the form's POST data and its redirect to PHP feature 

    Hope this help. Please feel free to contact us again anytime for any inquiry on JotForm.

    Cheers!