How to include an add item option to my form?

  • cguydesigns
    Asked on September 19, 2020 at 4:06 PM

    I am seeking this option:

    - First form has Name, Contact, Address & shipping information & an add item option

    - On clicking add item a second form opens with name, Description, Dropdown box with quantity, checkbox for price & color, dropown with store name, text box for url and item description and finally an option to add a second item

    - the first form will show the values above listed with the final cost tallied using paypal to complete the transaction

  • VincentJay
    Replied on September 19, 2020 at 4:58 PM

    Hello,

    You can use the Show or Hide condition. Here's a guide: https://www.jotform.com/help/316-How-to-Show-or-Hide-Fields-Base-on-User-s-Answer

    For example, if you want to add a new item, the form fields (name, description, dropdown, etc) will appear/show based on the user's answer. Please check my demo form: https://form.jotform.com/202626151220036

    You can also check the Configurable List widget. Here's the link: https://www.jotform.com/help/282-How-to-Set-Up-the-Configurable-List-Widget

    Here's the Configurable List widget demo form: http://form.myjotform.com/form/41112368425549

    Please give it a try and let us know if you have any questions. Thank you!


  • cguydesigns
    Replied on September 19, 2020 at 11:37 PM

    Hi Vincent,

    This was very helpful thank you so much, you are a lifesaver :)

    Now one other addition to this after developing the form:

    - I need to calculate two number values in the configurable list to be sent to a PayPal business widget to be charged. (i have tried the Form Calculation Widget)

    Test example: https://form.jotform.com/202625131677150

  • Carlos_C
    Replied on September 20, 2020 at 1:07 AM

    Hello,

    Thank you for your message.

    I create the following example for you: https://form.jotform.com/202630689864970.

    120504 Screenshot%20 %202020 09 19T22585 Screenshot 10

    As you can see in the screenshot you can add the calculation widget to your Item Information, please note that I remove the quantity because the calculation widget is going to take every number in the configuration file, at the moment is not possible to calculate a specific field in the configuration field.

    You can clone the form so you can test it https://www.jotform.com/help/42-How-to-Clone-an-Existing-Form-from-a-URL.

    Please feel free to reach out if you have other questions or need some more help. I will be happy to help!

  • cguydesigns
    Replied on September 20, 2020 at 12:02 PM

    Hi Carlos

    This is great!

    But I would need the option of being able to calculate two values since the final cost is dependent on it.

    What would be my next option?🤔

  • KrisLei Jotform Support
    Replied on September 20, 2020 at 12:51 PM

    Hi,

    To clarify, the two values numerical values, that would be for the Quantity and the Price, correct? Kindly give me more time to check if there's a workaround to meet your requirements.

    I will get back to you shortly. Thank you.

  • cguydesigns
    Replied on September 20, 2020 at 1:38 PM

    Hi Kris Lei,

    That is correct :) Thanks much.

    Also, I am unable to see the configurable list on Godaddy & the customize responsive code for the configurable list keeps glitching; one minute it works then next it doesn't :(

    https://nodnerbshippingco.godaddysites.com/order-online

  • KrisLei Jotform Support
    Replied on September 20, 2020 at 5:48 PM

    Apologies for the late response.

    Unfortunately, it's not possible to perform calculations inside the Configurable List widget, and it seems that there's no workaround to meet your requirements using the said widget.

    I think the best approach is to use the Input Table field because we can perform calculations in it. You would need to use the Multi-Type Columns: Input-Table-s-New-Type-Multi-Type-Columns

    Then you would need to create a condition to perform calculations in the Input Table field: Calculate-Values-in-the-Input-Table-Through-Condition

    Then you can add another column on the Input Table wherein the subtotal for each item is shown:

    1600637671 5f67cae7b1060 Screenshot 0921 Screenshot 10

    Then add a Form Calculation widget wherein the Grand Total for all the items is calculated and displayed:

    1600637788 5f67cb5c49bbf Screenshot 0921 Screenshot 21

    For reference: How-to-Perform-Form-Calculation-Using-a-Widget

    Here's the result:

    1600638408 5f67cdc8a9bdd form Screenshot 32

    Here's the cloned form for your reference: https://form.jotform.com/202636675300956

    I hope this helps. Let us know if it didn't meet your requirements.



  • cguydesigns
    Replied on September 23, 2020 at 12:58 PM

    Hi Kris Lei,

    Thank you for your assist :)

    A few questions:

    - The option I had at the beginning where the user can add a new item row when needed is lost in this option; possible solution?

    - how did you get the dollar sign to appear for the subtotal and price?

    - how to make this table responsive?

     

    Thanks much.

  • KrisLei Jotform Support
    Replied on September 23, 2020 at 2:49 PM

    - The option I had at the beginning where the user can add a new item row when needed is lost in this option; possible solution?

    Unfortunately, it's not possible to have an 'add' option to the Input Table, I think you would need to set a maximum number of rows on the table or create multiple tables and create a condition to hide/show the field if the user would like to add more items: -How-to-Show-or-Hide-Fields-Base-on-User-s-Answer

    - how did you get the dollar sign to appear for the subtotal and price?

    You can manually type the dollar sign on the Form Calculation widget:

    1600886445 5f6b96ad0e671 Screenshot 0924 Screenshot 10

    - how to make this table responsive?

    Unfortunately, it's not possible to make the element mobile responsive due to the structure, it's actually an HTML table which is not mobile responsive, but as an alternative, you may inject the following CSS code and display the table with a scrollbar:

    @media screen and (max-width: 480px){

    [data-type="control_matrix"] div[id*="cid"] {

      overflow-x: auto;

    }

    }

    For reference: How-to-Inject-Custom-CSS-Codes