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

    Print POST data URL image on submission.

    Asked by bigday on August 15, 2013 at 11:13 AM

    Hi!
    I have radio buttons with images as fields. I'm customizing my submit page.

    I got an array [choosedesign] => http://artdef.net/%22http://artdef.net/test/ebayform/images/%236.jpg/%22

    How i can get rid of "
    http://artdef.net/%22" & "/%22" and print/shows correct image url?

    screenshot

    my code:

    <?php

           print_r($_POST);

           $design = $_POST[choosedesign];

           $ebayid = $_POST[ebayid4];

           $text = $_POST[invitationannouncementdetails];

           print "<p>Order details:<p>";

           print " <p>Your design: $design<p>"; 

           print " <p>Your text: $text<p>"; 

           print " Thank you $ebayid for your order!";      

     

     ?>

    Page URL:
    http://artdef.net/test/mariusz/index.html

    POST post data print image fields submission
  • Profile Image

    Answered by jeanettebmz on August 15, 2013 at 04:11 PM

    I am not sure  if I understood correctly. But I think you want to display the string rather than the image itself right?

    Since the variable $design will get whichever option an user chooses from the radio buttons, you should insert apostrophes . Also make sure you define correctly your variable names. In this case, you did not use  capital D as it should be.

           $design = $_POST['chooseDesign'];

      

    I hope this helps

  • Profile Image

    Answered by nwy on August 15, 2013 at 08:33 PM

    I need something for cleaning URL from weird array output. Code like this but is not working?

           $design = $_POST['choosedesign'];

           $design = str_replace ('http://artdef.net/%22', '', $design);

    $design = str_replace ('/%22', '', $design);

           print " <p>Your design: $design<p>"; 

     

  • Profile Image

    Answered by nwy on August 15, 2013 at 08:39 PM

    p.s. Changing jotform avatar with uploaded image file is not working!Changing avatar for uploaded image file is not working

  • Profile Image

    Answered by khrisell on August 16, 2013 at 04:58 AM

    Hello nwy,

    I highly suggest that you follow what Ma'am Jeanettebmz has suggested.

    Please use a capitalized "D" in this code.

    $design = $_POST['chooseDesign'];

    Then let us know if there is further assistance needed.

    Thank you and we will wait for your response to assist you further.

  • Profile Image

    Answered by nwy on August 16, 2013 at 07:05 AM

    With capitalized "D" $_POST get nothing. I see two ways to resolve my problem:

    1. Fix jotform SEND in case of image fields, so that the output array will be just clean no messy url of image field. Now I get this output for choosen field:  http://artdef.net/%22http://artdef.net/test/ebayform/images/%236.jpg/%22

    but it supposed be this:  http://artdef.net/test/ebayform/images/%236.jpg

    2. Use php _replace to clean messy jotform url.

    ??? 

  • Profile Image

    Answered by nwy on August 16, 2013 at 07:45 AM

    I used php substr to cut the proper url but it has one fundamental flaw that the url must always have the same number of characters. I realized also that delete my own class of the form field change output string for img field but is still messy.

    $design = $_POST['choosedesign'];

           $design = substr($design, 42,47);

           print "<p>Order details:<p>";

           print " <p>Your design:<p>";

           echo '<img src="'.$design.'">';   

  • Profile Image

    Answered by jeanettebmz on August 16, 2013 at 02:36 PM

    Try use it this way:
     

    echo '<image scr="$design">';

  • Profile Image

    Answered by nwy on August 16, 2013 at 03:07 PM

    ehhh is like talkin to the wall :(

  • Profile Image
    JotForm Support

    Answered by jonathan on August 16, 2013 at 07:16 PM

    Hi,

    Have you tried using urlencode and urldecode to fix the messy URL print?

    Check this article on PHP manual.

    In our JotForm guide Send-POST-Data-From-JotForm-Using-PHP-in-Custom-Thank-You-Page, you can see a sample useage of this.

    Please inform us if you need further assistance.

    Thanks. 

  • Profile Image

    Answered by bigday on August 17, 2013 at 06:06 AM

    urldecode is just changing %22 for quotation mark leaving me still with this impossible to show messy url:
     http://artdef.net/"http://artdef.net/test/ebayform/images/#6.jpg/"

    Anyway I'm using substr and is working fine. I just need have same length for all my image fields urls.

    Thanks anyway for trying. BTW Someone could fix SEND output for images urls or at  least PLEASE do something with your JOTFORM users profile image upload! This issue is since february 2013 and still not fixed. Come on!

  • Profile Image
    JotForm Support

    Answered by Tasha on August 17, 2013 at 02:39 PM

    Thanks for letting us know that you found a work around to this issue. Please let us know if the work around does not work in the future as the url for the images change so that we can find another solution for you.

    I am also seeing where you already started another thread about the problem that you are having uploading images and our developers are already looking into it.

    Thanks!