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

    Can I display a calculate value on a text box?

    Asked by KetZalPromos on September 19, 2013 at 05:18 PM

    Hi! hope you have a great day! My question is this: I have a text box where the client submits how much he want's to get for an object he want to sale. and in the next box it will display the result of that price plus 20%. How can I do this? my form is in spanish so the price of the client will be the "¿Cuanto quieres recibir?" text box and the one where the result will be display is the text box "Precio de venta. Thanks in advance :)

    http://www.jotform.com//?formID=32615116692857

    JotForm next www thanks
  • Profile Image
    JotForm Support

    Answered by EltonCris on September 19, 2013 at 09:14 PM

    Hi,

    That's possible when you take and embed your form using form source code and then add some scripts that calculates the textbox value and print the result on the other textbox. How to get your Form Source Code

    If you are OK with form source code embedding, we can provide to you the custom script needed for the calculation. If I am correct, the formula would be the following.

    Precio de venta = (¿Cuánto quieres recibir? + 20%)

    Thanks!

  • Profile Image

    Answered by KetZalPromos on September 20, 2013 at 10:54 AM

    Hi EltonCris, thanks. That's the formula :) just one thing... I have my forms already on a facebook page, if I embed my form again I have to remove it from facebook or something? and will the formula results be display in the facebook page too?

    Thanks for the answer!!

  • Profile Image
    JotForm Support

    Answered by Welvin on September 20, 2013 at 01:06 PM

    Hi,

    I'll come up with the solution later today.

    Yes, you will have to remove your current form embed codes from Facebook and place the new modified source codes.

    Thanks

  • Profile Image

    Answered by KetZalPromos on September 20, 2013 at 01:38 PM

    Ok thanks, one last thing (hopefully jaja) where do I write the new codes? (I download the source code and open it on Dreamweaver, it's that ok?) and when I added what you send me I should do a new form using an existing one, the one I do on Dreamweaver, so I do the facebook embed to upload the new, or tehre is no need?

    Thanks for everything!!

  • Profile Image
    JotForm Support

    Answered by EltonCris on September 20, 2013 at 03:18 PM

    @KetZalPromos

    You can embed the source code with the calculation code directly on facebook. I think that's fine.

    We will provide you further instruction once the script is done. We have to do quick support jobs for now but we'll make sure to get back to you as quickly as possible.

    Thanks!

  • Profile Image

    Answered by KetZalPromos on September 20, 2013 at 03:32 PM

    Oh! yeah, sure, no worries :) thanks!

  • Profile Image
    JotForm Support

    Answered by EltonCris on September 21, 2013 at 07:13 AM

    @KetZalPromos

    Here's the script. http://pastiebin.com/523d7ea34d585

    Try embedding this directly in your FB page.

    Demo: https://shots.jotform.com/elton/calculation_270032.html

    Hope this helps. Feel free to let us know here if you come across any issues or if there's something wrong on the calculation.

    Thanks!

  • Profile Image

    Answered by KetZalPromos on September 23, 2013 at 11:43 AM

    First of all thanks for everything! :) really thanks for the help :) now I do have 2 things to ask: 1. The calculation is adding 20 cents to any value I put on the text box and it should be the 20% of the value the client puts in the "¿cuanto quieres recibir?" text box, I saw my message before and I didn't explain it correctly so... my bad, sorry... the calculation should be something like:

    Precio de venta = (¿Cuánto quieres recibir? + (¿Cuánto quieres recibir? *20%))

    And 2. Once I hace the code like the last you send me, where did I copy that code here in JotForm? or I have to copy it on the facebook static HTML directly?

    Thanks for your patience and your help :D

  • Profile Image

    Answered by KetZalPromos on September 23, 2013 at 12:01 PM

    have* not "hace" sorry :S

  • Profile Image
    JotForm Support

    Answered by Welvin on September 23, 2013 at 03:10 PM

    I have forwarded this thread to my colleague so he can update the codes. Thanks

  • Profile Image

    Answered by KetZalPromos on September 25, 2013 at 03:04 PM

    Thanks :)

  • Profile Image
    JotForm Support

    Answered by EltonCris on September 25, 2013 at 09:55 PM

    Hi there!

    Sorry for the delay.

    Here's the updated script: http://pastiebin.com/5243934c48063

    You can check the same demo page: https://shots.jotform.com/elton/calculation_270032.html

    Should there any questions arise, let us know here.

  • Profile Image

    Answered by KetZalPromos on September 26, 2013 at 12:31 PM

    It works good! Thanks!!! just one question (sorry :S): I have to put that piece of script on the static HTML tab I already have on my facebook?

  • Profile Image
    JotForm Support

    Answered by EltonCris on September 26, 2013 at 08:33 PM

    @KetZalPromos

    Yes, but you have to use form source code in order for the code to work.

    1. Get your form source code: How to get your Form Source Code (just copy the provided source code).

    2. Paste the calculation script below the entire form source code.

    3. Embed them together in your Facebook HTML tab.

    Let us know if you still have questions.

    Best Regards!

  • Profile Image

    Answered by KetZalPromos on September 27, 2013 at 11:47 AM

    Thank you!! I'll try it and I'll let you know. :)

  • Profile Image

    Answered by KetZalPromos on September 27, 2013 at 05:09 PM

    Hey, it's me again, I think I did somenthing wronge, while you were working on the script I changed the imput mask on the box (from: Q. ##########.## to just number 10 digits) where the price was on... Now I try the code and it does not work. Can you please help out. Thanks.

  • Profile Image
    JotForm Support

    Answered by EltonCris on September 27, 2013 at 07:59 PM

    @KetZalPromos

    Yes, that might be it because I used to filter that "Q" word on the first formula. Let me update it and get back to you. :)

    Stay tuned!

  • Profile Image
    JotForm Support

    Answered by EltonCris on September 27, 2013 at 08:13 PM

    Ok, here's the updated script. This should work.

    http://pastiebin.com/52461ef9e82f8

    Cheers!

  • Profile Image

    Answered by KetZalPromos on September 30, 2013 at 05:19 PM

    Hi, thanks this is great! thank you very much :) now I have one little problem and is somenthing more of the style of the form: I copy and paste the Source code to my Static HTML on facebook and it sets the form aligned to the left and no in the center, and the font is different :( gonna tell you what I did so you can tell me what I did wronge jaja:

    Went to embed - Copy the Source code - paste it to my static HTML - look for the special script - copy it and paste it down the HTML I pasted before. And that's all I did :S

    I'm sure I missed something so thank you again for your patience.

  • Profile Image

    Answered by khrisell on September 30, 2013 at 08:01 PM

    Hello,

    Can you provide us the final code where you already added the special script so that we could check if you missed out on something. 

    Thank you and we will wait for your response so that we could assist you further.

  • Profile Image

    Answered by KetZalPromos on October 01, 2013 at 12:25 PM

    Sure :) and thanks again :)

    --source code removed----

     

     

     

     

  • Profile Image

    Answered by EliezerN on October 01, 2013 at 01:22 PM

    Thanks for providing the source code.

    This message has been forwarded to my colleagues so that they can check the custom code and find if something is wrong. Once they know what is wrong will update you.

    Thanks

  • Profile Image

    Answered by KetZalPromos on October 02, 2013 at 02:47 PM

    Thanks to you for the help :) 

  • Profile Image

    Answered by KetZalPromos on October 10, 2013 at 02:54 PM

    Just wanted to know if you got somenthing with the code?

  • Profile Image

    Answered by EliezerN on October 10, 2013 at 05:11 PM

    @KetZalPromos

    Unfortunately we have not received any update from our colleagues. They have received your message and once they get online will get back to you with the update of your concern.

    Thanks

  • Profile Image
    JotForm Support

    Answered by EltonCris on October 11, 2013 at 01:46 AM

    @KetZalPromos 

    I am truly sorry the latency. For some weird reason, your last request have missed to land on my inbox so I failed track the issues you've encountered on embedding the form. 

    Since you are embedding the form to FB page, I'm afraid the Static HTML iframe wrapper app would stripped out all the stylesheet and js links. This might be the caused of the problem. The following embed method should work.

    1. Combine the form source code together with the calculation script as to my previous instruction.

    2. Save the combined source code as html file. e.g. myform.html

    3. Upload the html file to your server. If you do not have one, you can use free hosting sites like http://www.awardspace.com/

    4. Get the form URL and embed it as iframe to your FB page. You can use the following iframe embed code.

    <iframe allowtransparency="true" src="http://www.yoursite.com/myform.html" frameborder="0" style="width:100%; height:1400px; border:none;" scrolling="auto"></iframe>

    Replace the form URL above with the correct location of your form URL.

    If you have any difficulties with any of the steps above, let us know.

    Regards!

  • Profile Image

    Answered by KetZalPromos on October 30, 2013 at 02:25 PM

    Thanks, I just saw this... sorry, so I just have to put that code in FB? the one you send me on the step 4 (with the url of the form I just uploaded)

  • Profile Image

    Answered by KetZalPromos on October 30, 2013 at 02:45 PM

    I did it but it's blank on the fb page :S and when I add the "s" in http it sais "error in SSL protocol" help plis :( it is working ok on the server (the form) is just not display on facebook.

  • Profile Image
    JotForm Support

    Answered by EltonCris on October 30, 2013 at 03:11 PM

    @KetZalPromos 

    Did you replaced the URL on that code with the URL of the html file with the calculation function? It was on my previous messages. Kindly review.

    <iframe allowtransparency="true" src="http://www.yoursite.com/myform.html" frameborder="0" style="width:100%; height:1400px; border:none;" scrolling="auto"></iframe>

    If you also need us to check your FB page here, let us know the FB page URL so we can help you check if the form works fine here.

    Thank you!

  • Profile Image

    Answered by KetZalPromos on October 30, 2013 at 03:27 PM

    I really appreciate all the help thank you so much, yes I did... <iframe allowtransparency="true" src="http://isleofsam.dx.am/myform.html" frameborder="0" style="width:100%; height:1400px; border:none;" scrolling="auto"></iframe>  The tab will be display at this facebook page https://www.facebook.com/Chinchilete?sk=app_190322544333196

  • Profile Image

    Answered by KetZalPromos on October 30, 2013 at 03:31 PM

    You'll notice the tab is there jaja we just added all the source code + the special script on static html tabs and it was working before, then we change the adress for notifications and then started to not work jeje. right now I'm trying on a random facebookpage were I try tabs before post them...

  • Profile Image
    JotForm Support

    Answered by EltonCris on October 30, 2013 at 04:02 PM

    @KetZalPromos

    The form works just fine on my chrome browser.

     

    However, due to the fact that FB requires https to avoid security errors on any browsers which possibly results to the unsecured contents not being displayed we'd suggest to turn every URL on your form from http to https.

    Example:

    From:

    http://www.jotform.com/uploads/Ket

    to

    https://www.jotform.com/uploads/Ket or https://secure.jotform.com/uploads/Ket

    The easiest way to do this is to find all http and replace it with https. If you're using notepad editor, press ctrl + h then find http, replace to https then click replace all.

    Lastly, if you're going to embed the form as iframe, make sure the URL on the iframe supports https.

    Let us know if you still need further assistance. Thanks!

  • Profile Image
    JotForm Support

    Answered by EltonCris on October 30, 2013 at 04:06 PM

    @KetZalPromos

    May I also suggest you to open a new thread for your next reply if in case you need us to check the problem further or if you need further assistance so our team will be able to assist you better. This thread is about custom calculation function so it would be a lot easier if we can handle your next issue on a separate thread.

    Thank you for your understanding!

  • Profile Image

    Answered by KetZalPromos on October 30, 2013 at 04:16 PM

    Sure, thanks :) yes, the form is there but it doesnt send the info when you put somenthing in it, and look the bullets in every text... those should not be there jaja, but thanks and I'm going to try the https thing if it doesn't work I'll make the new thread.

     

    Thanks again :)

  • Profile Image

    Answered by EliezerN on October 30, 2013 at 04:40 PM

    Thanks for your comprehension about posting your new concern in a new thread. We will do our best you help yout to get resolved the issue if the https solution does not work.

    Thanks