How to add product value to cart total upon form submission?

I’m adding a gift boxing section to my cart page, where I want to collect information about what the gift box name is, what products from the cart are included and if they want a gift note. I have built the form which collects the cart attribute information, but I need it to add value to cart as we charge £4 for gift boxing, currently, it just collects the information. I need the form to have a submit button which when clicked adds value to the total cart value, either adding the value directly or adding a product to cart on submit. I also allow multiple boxes to be added so each time a section is added and the submit is clicked it adds 4 pounds.

{% for item in cart.items limit:1%}
{% if item.product.tags contains ‘Can Be_Gift Boxed’ %}

<button type=“button” id=“myCheck” onclick=“myFunction()” name=“attributes[Gift Box My Items]” value=“Gift Box My Items”{% if cart.attributes[“Gift Box My Items”] == “Gift Box My Items” %} checked{% endif %} class=“Button Button–primary Button–full” data-text-swap=“Cancel Gift boxing”>
Gift Box My Items

Gift Boxing

Name:

Which items would you like inside? ( Max 3 items )
{%- for line_item in cart.items -%} {% if item.product.tags contains 'Can Be_Gift Boxed' %} {{ line_item.image.alt | escape }} {{ line_item.product.title }}
{% endif %} {%- endfor -%}

Would you like to add a free gift note?
Yes please
No thank you

Type of note

To:

From:

Message: {{ cart.attributes["Message"] }}

Remove Section
Add Section
{% endif %} {% endfor %}

Hello @alfie24

I understand your issue it required custom coding to add that extra product for the gift box. Please Inbox me

Best Regards
Parth Bhut

Want to modify or custom changes on store hire me.
If helpful then please Like and Accept Solution.
Email: parth.bhut143@outlook.com
Skype: parthbhut7

Hi ParthBhut,

I have a similar problem.. I have a form with checkboxes that currently submits. I want to add a cost to the cart of $60 when the form is sent. Can you do this for me and how much will it cost.
Reach me directly on justin@jpcomputersystems.com.au

You want to show $60 on the cart page? @Samknotek