Purchase Order facility

  • Profile Image
    boogs
    Asked on December 08, 2011 at 06:55 PM

    I am trying to set up a purchase order facility where I will have a different form for each main product and then the customer can select additional related products, giving a total for the order at the end, including the cost of the main product. For example:

    Main Product                    GBP200

    additional product 1   [X]   GBP50

    additional product 2   [ ]   GBP75

    additional product 3   [X]   GBP25

    additional product 4   [X]   GBP15

    additional product 5   [ ]   GBP75

     

    Total                               GBP290

     

    I have set this up with everything, including the main product as a separate product, which works fine except that the customer doesn't then have to select the main product and the additional products are not available separately. If I could do it this way but make the first product mandatory that would be fine.

    Any ideas?

     

  • Profile Image
    NeilVicente
    Answered on December 09, 2011 at 12:00 AM

    This is not yet possible with JotForm's current version. However, a workaround to this can be made by using the form's full source code and modifying it to make the main product's selected and required.

    Take a look at this sample page to see it in action. This example assumes that the first product is the main product Notice how the checkbox for the first product is checked but disabled.

     

    Unfortunately, this solution has a drawback. The script that handles the total calculation will only trigger for user-initiated actions. Since the selection of the first product is done via code alteration, the form does not calculate the total price unless the user selects another product.

     

    If you are still interested in this solution, kindly respond right away so I can provide you the specifics on how it can be achieved.

  • Profile Image
    boogs
    Answered on December 09, 2011 at 05:28 AM

    Thank you for the quick response. That is a shame as it is so close to what I want but not quite there. I don't suppose there is a bit of magic that can be done to automatically select one of the options and then deselect it so that the main price is included.

    Is it possible, if the main product wasn't in the list, to use code to show a total price after the additional services price, for example:

    Additional services ................

                                ................

                                Total GBP295

    Then coded to show something like:

               Formation cost  GBP595 + additional services GBP295 = Total cost GBP890

    If it is not possible then I think I will probably go with making the client select the first option using text and making the whole field required so at least they have to select something. Perhaps you could supply the alternative code though in case I change my mind.

  • Profile Image
    fxr
    Answered on December 09, 2011 at 05:47 AM

    This solution is undocumentated and you will need to try and test it thoroughly before placing it in a live form

    Add a Free Text (HTML)  field to the bottom of your form. 

    Paste the following code into it:

    <script type="text/javascript">$('input_126_1001').checked=true;$('input_126_1001').disable();$('payment_total').update('575.00');</script>

    Then click the Complete button.

     

    Test form here: http://www.jotform.com/form/13423327315

    The best solution, however, for adding these type of customisations to your form is download the forms code and use the script I have given to get the desired functionality on your purchase order form.

     

  • Profile Image
    boogs
    Answered on December 09, 2011 at 06:04 AM

    That is brilliant - thank you very much