Creating a quick quote jotform

  • jmuskus
    Asked on September 15, 2014 at 8:17 AM

    This is the current from I am working on: http://www.jotform.com//?formID=42535606641352

    I would like (if possible) to turn it into a quick quote generator where by based on the selections made in the to and from fields a price is calculated, basically exactly the same as seen here: http://www.resortrides.com/ where the quote is then displayed on the next page along with another form for the client to fill in their details if they wish to request a booking.

    I found another thread here: http://www.jotform.com/answers/365439-Creating-an-instant-online-quote-form where the person was looking for the exact same thing as me but it doesn't look like it was completely resolved so just want to check if this can first of all be done and if you can point me in the right direction for getting started, thanks!!

  • Ashwin JotForm Support
    Replied on September 15, 2014 at 9:44 AM

    Hello jmuskus,

    I believe it is possible to achieve your requirement. But before committing on this, I would like to understand and know the formula based on which the price will be calculated.

    I would suggest you to  explain the conditions, formula and logic on how the price will be calculated and we will take a look.

    We will wait for your response.

    Thank you!

  • jmuskus
    Replied on September 15, 2014 at 9:56 AM

    There will be 20 or so destinations in both the from and to drop down menus so depending on where the person is going from and to the price will be different. There will be fixed prices for all journeys as long as there are only 8 people or less travelling as that is how many seats we have in one van. If the person selects a number higher than 8 in the passengers box then I want to have a message appear telling them to contact us directly for parties of more than 8 people. The price will also be different depending on whether they select one way or return. The date and time fields will not affect the price. Essentially I would like something as seen here: http://www.resortrides.com/ which looks a bit simpler than mine and if you think it would work better similar to how they have done it I would be happy to simplify my form. If you try out their form you will see the result it provides on the next page. Look forward to hearing from you!

  • Ashwin JotForm Support
    Replied on September 15, 2014 at 11:28 AM

    Hello jmuskus,

    Thank you for the information.

    Let me try and create an initial version of your form and then we will go from there.

    We will get back to you soon.

    Thank you!

  • jmuskus
    Replied on September 18, 2014 at 3:52 AM

    Any joy?!

  • Ashwin JotForm Support
    Replied on September 18, 2014 at 5:18 AM

    Hello jmuskus,

    Please accept my apology for delayed response.

    We can only work on this in our free time. I will get back to you on this soon.  

    Thank you!

  • jmuskus
    Replied on September 18, 2014 at 5:31 AM

    Ok, thanks for letting me know, I really appreciate it!

  • Ashwin JotForm Support
    Replied on September 18, 2014 at 5:57 AM

    Hello jmuskus,

    Thank you for your understanding.

    I have already started working on your form. I have completed the form layout and currently working on conditions logic to generate the quote. I have tried to mimic the form of resortrides.com.  

    Please take a look at the following form:   http://form.jotformpro.com/form/42601956771964? 

    Can you please explain me how the you want the calculation to be done. Example:

    Airport to resort - one way per passenger what will be the cost.

    There will be a logic to calculate the price correct? Please explain me that and I will add that in conditions.

    I will wait for your response.

    Thank you!

  • jmuskus
    Replied on September 18, 2014 at 6:28 AM

    There will be a set rate for each route e.g. a single from Geneva to Chamonix will be 150 euro, a return would be 285 euro, a single from Geneva to Morzine would be 170 euro etc. Does that help?

  • Ashwin JotForm Support
    Replied on September 18, 2014 at 8:53 AM

    Hello jmuskus,

    Okay. I will add the conditions to do the calculation for and then you can change it.

    Do you want to show the quote on the same form or you want to show it in a different page as it is being done in resortrides.com?

    I will try to create both the examples.

    Thank you!

  • jmuskus
    Replied on September 18, 2014 at 9:39 AM

    On a different page please so that I can then insert another form on that page that allows them to put their details in should they wish to book the transfer... Thanks!

  • KadeJM
    Replied on September 18, 2014 at 11:48 AM

    It seems my colleague is already working on a custom solution for you for this but I will also try to help with it as well.

    I've sent a follow-up message to him to check on his progress and we'll let you know with an update to this as soon as we can.

  • KadeJM
    Replied on September 18, 2014 at 12:16 PM

    Okay so after looking at it a little more I think we may need a little more clarification with two things if that is alright.

    I noticed you said on a different page, but did you mean within the same form and you would embed a form onto it as well then if I understood that correctly?

    Also, for your calculation it seems to be a set rate that increases because of the "etc etc" or have I misunderstood you?

    I was trying to figure out a the logic necessary for the calculation and apply that to sort out your form calculations for each as needed. Here's the pattern I see so far:

    Geneva to Chamonix

    285 - 150 = 135

     

    and 

     

    Geneva to Morzine would be 170

    150 + 20 = 170

    170 + 135 = 300 

     

    So it's + 15 added for the return cost?

     

    Is this going to gradual increase for each of the to, from, return? Or is it a set rate already?

    I do apologize in advance if I've got it mixed up. If that is the case then perhaps since my colleague was working on it he might know what you mean better by it.

     

  • jmuskus
    Replied on September 18, 2014 at 12:32 PM

    There is a set rate for every journey, here is a screen shot of my price list. Your colleague is trying to create me a form similar to the one seen here: www.resortrides.com Once the person fills in the initial form they are taken to another page where their quote is displayed along with another form that they can fill in with their details should they wish to book a transfer.

    Creating a quick quote jotform Image 1 Screenshot 20

  • Welvin Support Team Lead
    Replied on September 18, 2014 at 1:52 PM

    Thank you for the image. I have forwarded this thread to my colleague. I am sure he receives your reply as well.

    Thank you!

  • jmuskus
    Replied on September 30, 2014 at 3:59 PM

    Hi Guys,

    Is there any update on this? Am happy to use my current form for now but don't want to hang around for this one if you don't think it will be possible, so just let me know either way!

    Thanks and I really appreciate your efforts.

  • rehcgt
    Replied on September 30, 2014 at 7:00 PM

    Hi, I worked on a way to replicate the form on www.resortrides.com, and I came up with this demo. Please take a look at it and see if this is what you want to do with your form.

    If it is, I can try to help you out to do this in your own website.

    Cheers.

    P.S. Please note that I entered random prices for the calculations, so they will not match with the pricing list you posted here.

  • jmuskus
    Replied on October 1, 2014 at 6:24 AM

    Looks good to me!! Thanks! Was it very complicated to do?

  • Welvin Support Team Lead
    Replied on October 1, 2014 at 8:19 AM

    You can simply grab the link, then clone it to your account. Here's how you can clone it: http://www.jotform.com/help/42-How-to-Clone-an-Existing-Form-from-a-URL. There's a calculation in the form, but I'm not sure if that's how you want it. You can check it after cloning it to your account.

    Thank you!

     

  • jmuskus
    Replied on October 1, 2014 at 9:13 AM

    Hi, I might need a bit of help understanding the calculations. I removed the * no. of passengers as the price will always be the same as long as there are 8 or less (and if more than 9 is chosen the message comes up). I am not quite sure how to adjust the calculations for my prices, e.g. if a one way from Geneva to Chamonix costs 150euros how do I translate that in the calculation values?

    Thanks!

  • rehcgt
    Replied on October 1, 2014 at 9:41 AM

    Hi,

    You can change the calculation values for each dropdown by clicking in the properties icon and then clicking on the “Show Properties” option.

    Creating a quick quote jotform Image 1 Screenshot 30

    You should look for the calculation values and change them accordingly.
    Just leave the first one as 0 since that would be the value for an empty selection (you might need to make this dropdowns as required in order to avoid an empty selection).

    Creating a quick quote jotform Image 2 Screenshot 41 

    Regarding your question about if it was complicated to do.
    The answer is no, but you will require a php script on your second form in order to capture the values selected on the first form. Here you can find a guide on how to do this.

    I will be glad to assist you in order to make this work in your website, just let me know if you have any more questions.

     

    Thanks.

  • jmuskus
    Replied on October 1, 2014 at 10:54 AM

    Ok got it, been a while since I did some proper maths! Have got it producing all the correct calculations now. However regarding the php script I think that is going to be a bit beyond me...

  • KadeJM
    Replied on October 1, 2014 at 11:23 AM

    Okay thanks for letting us know about that and we'll lend a hand with the rest so that you can get this up and running as needed.

    I looked back through your responses and found you mentioned the second part where the user would be taken to another page to physically fill in further details with the quote being displayed.

    Do you have that page already set up?

    If so is it a separate page on your site?

    Or is it a another jotform that you are planning on using for that?

     

    If it's part of another form then you might be able to use prepopulation instead whereas a PHP Script (mentioned in the PHP Guide) is more intended for sending the data for outside use. Either way though we would need to know more information about the target page to help with this better.

     

  • jmuskus
    Replied on October 1, 2014 at 11:37 AM

    Hi, the idea would be once they fill in the quote form and submit it they will be taken to another page on the site where the quote is displayed along with another form that they can fill in and submit should they wish to make a request to book that transfer. Similar to the page here:Creating a quick quote jotform Image 1 Screenshot 20

  • rehcgt
    Replied on October 1, 2014 at 11:51 AM

    Hi,

    I've pasted the php code that I used on my demo. You can check it out here.

    Basically what you need to do is capture the values of each dropdown by using the $_POST array. For example: <?php echo $_POST['transfertype']; ?> captures the value of the selected Transfer Type, <?php echo $_POST['airport']; ?> captures the value of the selected Airport, etc.

    Please take a look at it to see if it makes sense to you, and if you have any questions please post them here.

    Thanks.

  • jmuskus
    Replied on October 1, 2014 at 12:13 PM

    Ok thanks, so I need to take that php code (does there need to be some additional code added in depending on the webpage the info will be displayed on or do I do it exactly like you have pasted?) and enter it into notepad, save it as redirect.php and upload it to my site using Filezilla? How do I know which subdirectory to upload it to on my site? Hope this makes some kind of sense to you, I am just starting to get to grips with all of this!

  • rehcgt
    Replied on October 1, 2014 at 1:09 PM

    Ok, you can find my answers below in blue.

    (does there need to be some additional code added in depending on the webpage the info will be displayed on or do I do it exactly like you have pasted?) and enter it into notepad,

    I assume that you’re going to need to get the results from both forms, right?
    If that’s the case then you need to add some hidden fields on the second form in order to save the values from the first form. There are two approaches that I can think of to accomplish this:

    1.      Use the full source code of your form and paste it in the php file.
    Pros: It’s easy to include the hidden fields and get the values from the first form.
    Cons: Since you’re using the full source, every time you change your form in jotform, you’ll need to manually update the source code on your php file.

    2.      Embed the form using a different method (javascript, iframe, etc) and inject the values for the hidden fields using javascript.
    Pros: Every change you make in your form is updated on your page automatically.
    Cons: I’m not sure to call this a con, but you'll need to have a little knowledge of Javascript.

    save it as redirect.php and upload it to my site using Filezilla?
    Yes, just keep in mind that this php file will need to contain your second form (since it will act as a landing page in which you’re going to capture the additional information that you need from your customers)

    How do I know which subdirectory to upload it to on my site?

    You need to upload both files into the same directory that you use to display your current form.

    Please let me know which approach makes more sense to you and I’ll help you to implement it.

    Thanks.

     

    P.S. I’ve created a second form that will act as the landing page, please take a look at it to see what I mean about the hidden fields (you can also clone it like you did with the first one).

  • jmuskus
    Replied on October 1, 2014 at 1:48 PM

    Thank you so much for all this but I'm afraid it's all getting a bit beyond my understanding and capabilities!! I don't think I am going to able to manage to do this without someone actually showing me how! As i don't fully understand what to do to create the correct php file it would be very easy for me to do it wrong and then have no idea what I'd done!

  • KadeJM
    Replied on October 1, 2014 at 2:03 PM

    What exactly aren't you understanding which has you confused with the php file creation? Perhaps we can try to help break it down more so that you can accomplish it.

  • jmuskus
    Replied on October 1, 2014 at 2:24 PM

    Ok, well I'm game if you are! I just feel bad for all this time you're giving me! I have never done this kind of thing before and don't really know where to start with the php file. Do I need to put the full source code of the first form and the second form in the same file or just the second form? Do I then need to paste the same code that rehcgt provided 5 messages up in that file as well? What else needs to be in the php file? I really just need everything in baby steps right from the start!

  • rehcgt
    Replied on October 1, 2014 at 2:43 PM

    Okay, let’s try with the Javascript approach and see if it works for you.
    Please follow these steps:

    1.      Clone the second form since it already have the hidden fields and add the fields you need to use in order to capture any additional info from your customer (I already added the Full Name and address).

    2.      When the form is ready, click on the Embed Form button that’s located on the top menu bar.

    Creating a quick quote jotform Image 1 Screenshot 50

    3.       Click on the Embed option

    Creating a quick quote jotform Image 2 Screenshot 61

    4.       Copy the script text that’s shown on the textbox.

    Creating a quick quote jotform Image 3 Screenshot 72

    5.     Create a .php file on the editor of your preference (you can use notepad or notepad++ if you like) and copy the HTML code that you use for your other pages to make it look the same (if you want, you can post here the URL of your site so we can check and tell you what exactly you need to copy).

    6.      Enter the necessary HTML code to display the selected values and total quote in the area you want to do it, remember that you only need to add the php script (for example: <?php echo $_POST['transfertype']; ?>) to display the selected value.

    7.      Paste the text you got from step 4 in the area that you’ll use to show your second form.

    8.      Add this script below the script tag you pasted on step 7.

    9.      Publish your file and test if it works.

     

    Again, if you provide an URL that we can take a look at, it will be easier to provide you a more accurate solution.

    If you have any questions, please post them here.

    Thanks,

    P.S. Forgot to mention that you need to update the URL on the first form to match the URL of the php file that you create for the second form.

    Creating a quick quote jotform Image 4 Screenshot 83

  • jmuskus
    Replied on October 6, 2014 at 10:33 AM

    Ok, I'm going to get my site up and running for now with my basic form and then get these ones looking just how I want them before trying to put them on my site. I'll be back!