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

    Changing the value of the "JotForm.calendarOther" variable in the JotForm.init function does not take effect.

    Asked by AA_C on January 23, 2015 at 10:27 AM

    I am using the select date calendar on my forms. On the French form I wanted it to display the Months and days in French, I changed the java-script and this worked fine but for one thing the "Today" text. I thought by changing it in the java-Script it to would be in French but not so. Here is the Java Script section for the calendar I modified;

    JotForm.calendarMonths = ["Janvier", "Février", "Mars", "Avril", "Mai", "Juin", "Juillet", "Août", "Septembre", "Octobre", "Novembre", "Décembre"];

    JotForm.calendarDays = ["dimanche ", "lundi ", "mardi ", "mercredi ", "jeudi ", "vendredi ", "samedi ", "dimanche"];

    JotForm.calendarOther = {"aujourd'hui": "Aujourd'hui," };  ( This part seams to have no effect)

    Here is formID=33516475949265

     

    Page URL:
    http://www.aac.ca/fr/formulaires/inc/RapportConcours.html

    Screenshot
    french select all My Forms JotForm style
  • Profile Image
    JotForm Support

    Answered by BDAVID on January 23, 2015 at 12:13 PM

    Thanks for letting us know about this, I will try to figure this out, and find a solution for this. If needed, I will forward this to our second level for more assistance.

  • Profile Image

    Answered by AA_C on January 23, 2015 at 12:15 PM

    Sorry but I did not give the right url at first.

    Great thank you!

     

  • Profile Image

    Answered by Carina on January 23, 2015 at 02:01 PM

    For this you can edit the form's source code, by searching "today" and replacing it by "aujourd'hui":

    Let us know if we can assist you further.

  • Profile Image
    JotForm Support

    Answered by BDAVID on January 23, 2015 at 02:14 PM

    Here is my workaround, since I could not figure out why the "Today" text did not change when edited from the downloaded source code, (same thing you already tried):

    I decided to try to change it with CSS code injection:

    Here is the code that did the trick:

    .button:first-child +td +td{

    visibility: hidden;

    }

    .button:first-child +td +td:after  {

    visibility: visible;

    content: "Aujourd'hui";

    margin-left: -35px;

    }

    Please check my form here: http://form.jotform.co/form/50205470805851

    You may apply this workaround to your form, let us now if you need more help, we will be glad to assist you.

  • Profile Image

    Answered by AA_C on January 23, 2015 at 02:32 PM

    BDAVID,

    Your css code injection worked perfectly. Although this was the fix I think you need to dig deeper to find out why the java script didn't work.

     

    @CARINA

    The answer that you offered did not resolve the problem as there was no ware in the  embedded source code script with the word "today"  for the calender. I see it on the image but I don't know where this is. You are using Firebug to view the element and this code dose not appear in my editor.

    Thank you both,

    Robert

  • Profile Image
    JotForm Support

    Answered by BDAVID on January 23, 2015 at 03:37 PM

    You are welcome, it is quite odd why it is not working from the JS code, so I have reported this to our second level to check further.

    If you need anything else, please open a new thread, we will be glad to assist you.

  • Profile Image

    Answered by AA_C on January 23, 2015 at 03:42 PM

    So I looked a bit deeper into this scripting and see you use a hidden input for some java script that works on the calender, and creates the code shown above;

    <input type="hidden" id="simple_spc" name="simple_spc" value="41902989566975" />

      <script type="text/javascript">

      document.getElementById("si" + "mple" + "_spc").value = "41902989566975-41902989566975";

     

      </script>

    Do we have access to this or if we want to make an edit as shown or do we use firebug, then copy and past the html make required edits.... etc etc ?

     

    Robert

  • Profile Image
    JotForm Support

    Answered by Mike on January 23, 2015 at 05:49 PM

    If you would like to translate the Today word you can use the following format:

    JotForm.calendarOther = {"today":"Aujourd'hui"};

    I think that the 'simple_spc' field is there to protect the form from internet bots, so it should not affect the Calendar field.

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

  • Profile Image

    Answered by AA_C on January 23, 2015 at 06:05 PM
  • Profile Image

    Answered by AA_C on January 23, 2015 at 06:29 PM

    Hello Mike,

     I see what you have done vs what was done before. I will try this ... ... ...

    And it works as it should ... TNX Mike

    I removed the css code injection ... and all is good!

    You can put this one to bed now.

    regards,

    Robert

  • Profile Image
    JotForm Support

    Answered by Mike on January 23, 2015 at 06:48 PM

    You are welcome. Please feel free to contact us anytime.