How can I edit the javascript

  • Profile Image
    guest_23297711831051
    Asked on November 27, 2012 at 02:04 AM

    I've downloaded the source file andd looking to cahnge the language inside the javascript for the "required" function for each textbox. 

  • Profile Image
    liyam
    Answered on November 27, 2012 at 02:29 AM

    Hello.  The easiest way to do this is simply edit your form first in JotForm and then go to Preferences > Advanced Settings tab > and click the Form Warnings button.

    Edit the warnings there so you can modify it with your preferred message.  Save your form and download the source.

    If you have completely downloaded the source (including the js and css files), you can edit the jotform.js file and then edit the phrase on line 91.       

             required:           'This field is required.',  

    Please let us know if you need further assistance.

    Thanks.

  • Profile Image
    guest_23297711831051
    Answered on November 27, 2012 at 02:50 AM

    I've edited the source file and now have no way to absolutely localize the form. Can you please assist me

  • Profile Image
    liyam
    Answered on November 27, 2012 at 02:53 AM

    Sure thing.  Can you share with us the link where you have placed the form so we can check?  Also, by saying of localizing the form, can you explain further the details on this?

    Thanks.

  • Profile Image
    guest_23297711831051
    Answered on November 27, 2012 at 03:12 AM

    Basically im trying to use the form to insert data into my database and its on localhost right now so i can't possibly give you the link.


    I've succesfully used your form to insert the data into my database by changing 

    "<form class="jotform-form" action="http://submit.jotform.me/submit/23297604162453/"

    into

    "<form class="jotform-form" action="filename.php/"

    But the  exclamation mark
    "http://submit.jotform.me/images/exclamation-octagon.png"
     dissapears

    So  I've been trying to localize the whole css and javascript into my own server but It doesn't seems to work. 

  • Profile Image
    Welvin
    Answered on November 27, 2012 at 04:25 AM

    How about this guide: http://www.jotform.me/help/126-How-to-Insert-Update-Submissions-to-Your-MySQL-Database-Using-PHP

    Customizing some part of the jotform full source codes needs an extra care, you might loss some functions if you have modified the source. Sometimes, a conflict between your site scripts and jotform scripts will cause such issue.

    I am hoping that above guide will help. You can always inject custom CSS codes to our form by following this guide

     

    Thanks

     

  • Profile Image
    liyam
    Answered on November 27, 2012 at 04:48 AM

    Regarding your 'exclamation-octagon.png' image file. Try to download the copy of the said image and then place it on your own web server.  Then edit again jotform.js and go to lines 3080 and 3105. Change the URL src from '+this.url+'images/exclamation-octagon.png to the correct directory where the image is placed.

    Thanks.

  • Profile Image
    verex18
    Answered on November 27, 2012 at 07:18 PM

    Thanks for your response, Im having difficulties in changing which coding inside the source file that needed to be change so that it will be using the css and javascript that will be hosted on my server. Could you please explain how to change it

    Regards 

  • Profile Image
    liyam
    Answered on November 27, 2012 at 07:31 PM

    Hello verex18.  I'm not sure what you mean.  Don't you have the CSS and JS files when you downloaded the complete source of the form?  If not, can you go to the Embed wizard again and download the zipped file to download the complete sources of your form:

    Thanks.

  • Profile Image
    verex18
    Answered on November 27, 2012 at 09:21 PM

    Everything have been resolved excpet for the
    octagon.png

    I've downloaded the filr at put in under the file "assets" onmy server and changed line 3080 and 3105 to <img src="assets/exclamation-octagon.png" align="left" style="margin-right:5px;">

    Is there anything that I did wrong ? 

  • Profile Image
    liyam
    Answered on November 27, 2012 at 09:29 PM

    Not sure if this will work, can you try this:

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

    Thanks.

  • Profile Image
    verex18
    Answered on November 27, 2012 at 09:36 PM

    nope won't work. got any other way ?
    using css injection for example ? 

  • Profile Image
    liyam
    Answered on November 27, 2012 at 09:46 PM

    The problem with using CSS is that the image won't be as front but will become part of the background.

    How about trying this:

    <img src="../assets/exclamation-octagon.png" align="left" style="margin-right:5px;">

  • Profile Image
    verex18
    Answered on November 27, 2012 at 09:56 PM

    Nope mate, it still won't show up, I've read all the others question which face the same roblem as i am right now but othing seems to be working

  • Profile Image
    liyam
    Answered on November 27, 2012 at 10:33 PM

    There are two references of this image by the way.  Can you confirm that you changed it on both?  Can you also elaborate to us the structure of your directory?

    Somehow I just created the folder assets and then my reference is just <img src="assets/exclamation-octagon.png" align="left" style="margin-right:5px;"> and it worked without a problem.

    Please make sure that you have fully refreshed the page by using the shift key (on keyboard) + refresh or closing and opening the form again. 

  • Profile Image
    verex18
    Answered on November 27, 2012 at 11:43 PM

    Okay, everything is solved. I've put it inside the same folder as  my form and changed

     <img src="assets/exclamation-octagon.png" align="left" style="margin-right:5px;">

     into

     

     <img src="octagon.png" align="left" style="margin-right:5px;"> 

     

    and it worked perfecly.


    Im wondering why this problem arises after ive changed  the action from submitting into your database into mine.

    Another thing  is, as im using you pastel theme, the pastel.css initially doesn't seem to work  because of the  file structure in the .zip and  <link type="text/css" rel="stylesheet" target="_blank" href="css/styles/pastel.css" /> doesn't match.Inside the zip, the pastel.css is located inside the css folder but not inside the styles folder.  Only after correcting the  structure did i manage to make the css work.

    Hope this minor problem can be resolved in future update.

    Regards 

  • Profile Image
    idarktech
    Answered on November 27, 2012 at 11:55 PM

    @verex18

    Thanks for letting us know. I'll forward that to our development team for a resolution. Thank you so much for your cooperation.

    Have a great day!