Conditional minimum order limit

  • kevcheung30
    Asked on July 19, 2021 at 8:41 AM

    I have set minimum order limit to $60 for home delivery and i want to add two questions using "single choice", (delivery or pick up). If user select delivery option than $60 limit will be applied, however if user select pick up option than $60 will not be applied, can i do that?

  • Michal_S Jotform Support
    Replied on July 19, 2021 at 8:58 AM

    Hello!

    This is not an out-of-the-box feature of the Minimum Order Amount option, but it can be achieved with a workaround as follows:

    • Add a Number field, Hide it, and set the Default Value to 0:


      1626699452 60f576bcb5460 1 Screenshot 10
    • Add a Paragraph informing the user of the minimum order amount below the Single Choice element:


      1626699459 60f576c3bf9a1 2 Screenshot 21

    • Navigate to Settings, Conditions, and add a new Update/Calculate Field condition:

      update calculate fields Screenshot 32


    • Set it up like in the picture:

      1626699478 60f576d66333e 3 Screenshot 43

    • Add a Show/Hide Field condition:


      show hide fields Screenshot 54

    • Set it up like in the pictures:

      1626699518 60f576feb000e 4 Screenshot 651626699531 60f5770b6f320 5 Screenshot 76

    Now, when the delivery option is checked and the order is below $60, the user will not be able to submit the form and will be shown the appropriate message.

    Related guides:

    How to Show or Hide Fields Base on User's Answer

    How to Pass Field Value to Another Field?

    Please let us know if you require any further assistance.

    Thank you!

  • kevcheung30
    Replied on July 20, 2021 at 2:58 AM

    Thanks Michal!

    Appreciate that! do i have to turn off minimum order from Product List Settings?1626764276 60f673f408f7e  Screenshot 10

  • kevcheung30
    Replied on July 20, 2021 at 5:20 AM

    Thanks Michal!

    I followed above but it doesn't work when you ONLY buy from one item (more than $60), however this problem will be fixed if you triggered the drop down quantity again from the same or other item.

    Please see below screen and thanks in advance for your answer!


    1626772805 60f69545b9385  Screenshot 10


    1626772813 60f6954d928b3  Screenshot 21

  • Michal_S Jotform Support
    Replied on July 20, 2021 at 8:03 AM

    Hello!

    You don't have to turn the Minimum Order Amount option off for this to work.

    The current behavior is caused by the fact that the Number field initially doesn't populate when choosing the item - I apologize for not noticing that.

    Please change the condition that copies the value over to the number field to be triggered when the delivery option is chosen instead:

    134300 1 Screenshot 10

    This should fix the issue.

    Let us know if you require any further assistance.

    Thank you!

  • kevcheung30
    Replied on July 20, 2021 at 8:18 AM

    Thanks Michal again!

    It works now!

    i think the Minimum Order Amount option have to be turned off for pick up option otherwise it won't allow press the order button if amount below $60.

    thanks again!

  • Michal_S Jotform Support
    Replied on July 20, 2021 at 9:45 AM

    Hello!

    Yes, it does have to be turned off for the pickup option if you'd like the users to be able to purchase items below the limit - when I said it didn't have to be turned off, I was referring to the fact that this option does not interfere with the workaround I've shown in the previous message - I apologize for the misunderstanding.

    I'm glad your form functions the way you wanted it to now.

    Please let us know if you require any further assistance.

    Thank you!

  • kevcheung30
    Replied on July 20, 2021 at 11:35 AM

    Sorry Michal,

    I made another question on the other thread but i just thinking that could be related to this as well, please remove the thread if you are thinking they are related.

    Thread ==> missing paypal button (jotform.com)

    The form using paypal payment method, there are two options (debit/credit card and paypal) for payment at the end of the form, however the submit button is missing whenever i selected paypal option, debit/credit card option is fine (order now button is still there), it happened only after triggered the drop down quantity from MypPoduct item.

    Thanks in advance!

    https://form.jotform.com/211991862603863

  • Michal_S Jotform Support
    Replied on July 20, 2021 at 1:00 PM

    Hello!

    It's actually very good that you made a separate thread for this, as I would've most likely split it into a separate thread anyways, as it doesn't seem related.

    Please wait for one of our Support Team members to pick up that thread and work through your issue.

    Thank you for your patience.

  • kevcheung30
    Replied on July 21, 2021 at 6:45 AM

    Hi Michal,

    Thanks for the response!

    As i have paypal account issue so that i have to switched to Stripe instead and i just deleted the paypal method and using stripe checkout method, however the Total cannot be synchronized to Number field and displayed some unwanted number, please see below screen, thanks again!

    1626864235 60f7fa6b987e3 Capture Screenshot 10

  • Michal_S Jotform Support
    Replied on July 21, 2021 at 8:28 AM

    Hello!

    Unfortunately, it seems like the Stripe Checkout payment integration, in particular, is unable to pass the total cost into a number field.

    I have tested it with the base Stripe integration and it seems to work, so if that is an option for you then please use that instead.

    I will be splitting your inquiry into a separate thread and will forward this issue to our developers to fix it.

    We will notify you in that thread once it is resolved.

    I apologize for the inconvenience.

    Thank you!

  • kevcheung30
    Replied on July 21, 2021 at 8:35 AM

    Many thanks and i look forward the resolution!

    btw i don't mind using base stripe but is it possible to move the credit card details to the bottom just above the submit button?

  • Michal_S Jotform Support
    Replied on July 21, 2021 at 10:03 AM

    Hello!

    It is possible, but only using very crude CSS.

    Please try adding this code into your custom CSS:

    .form-all{

    position: relative;

    }

    #id_56{

    position: static;

    }

    #section_48{

    margin-top:400px;

    }

    #stripe-templates {

      position: absolute;

      bottom: 350px;

    }

    Let us know how that goes,

    Thank you!

  • kevcheung30
    Replied on July 21, 2021 at 11:30 AM

    Hi Michal,

    i added your code and it works on the testing form, but the alignment is not fitted on my real form in here ==> https://form.jotform.com/212014276878863 , it pretty similar but just add more section into it so the position is not right, sorry that i didn't make it clear!

  • Michal_S Jotform Support
    Replied on July 21, 2021 at 2:27 PM

    Hello!

    That is because the IDs of the fields in your live form are different.

    Please try this code in your live form instead:

    .form-all{

    position: relative;

    }

    #id_84{

    position: static!important;

    }

    #section_52{

    margin-top:400px;

    }

    #stripe-templates {

     position: absolute;

     bottom: 350px;

    }

    Let us know if you require any further assistance.

    Thank you!

  • kevcheung30
    Replied on July 22, 2021 at 7:34 AM

    Hi Michal,

    Thanks for all your advise and solution, if the boarder open and i have chance travel to the state, i will definitely come to get a beer with you, thanks mate!

    BTW I give up the credit card move to end of form as it will just overlapping my q&a section.

    Regards

    Kevin

  • Michal_S Jotform Support
    Replied on July 22, 2021 at 8:59 AM

    Hello!

    I appreciate the kind words!

    I apologize - I completely forgot that the form also extends on the bottom, which will mess up the positioning of the credit card element.

    This, unfortunately, makes it impossible then, as the form extends both from above and below the credit card field - I've tried several workarounds, but nothing seems to work for this particular case.

    I apologize for the inconvenience.

    Thank you!

  • kevcheung30
    Replied on August 11, 2021 at 7:21 AM

    Hi Michal,

    I've told by developer team that the issue you escalated has been fixed, i tried your code above injected to css but it overlapping the Section Collapse Q&A bar, i think it could be the id_ number or section number affected the position, could you please look at it again ==> https://form.jotform.com/212223557271854

    Thanks!

    Kevin

  • Michal_S Jotform Support
    Replied on August 11, 2021 at 8:54 AM

    Hello!

    Do you mean moving the Credit Card fields to the bottom as well?

    If so, then unfortunately we came to the conclusion that it is not possible, as the only way to position it is relative to the bottom of the form, but the height of the form changes depending on whether the Q&A section is open or not.

    If this is not the part you meant, please let me know which one is not functioning.

    Thank you!

  • kevcheung30
    Replied on August 11, 2021 at 8:58 AM

    Hi Michal,


    Yes move the credit card fields just above the order button, is it possible?

    Thanks!

  • Michal_S Jotform Support
    Replied on August 11, 2021 at 11:56 AM

    Hello!

    As I said, unfortunately, it is not possible due to the variable height of some of the elements in your form.

    It is possible to position it like this, but every time the form's height changes due to expanding the Q&A section or choosing the delivery option, the layout is going to get messed up.

    I apologize for the inconvenience.

    Thank you for your understanding.