Skip to content
Advertisement

Show additional information depending on shipping selected

I would like to show additional information/order notes when a specific shipping method was selected.

I have multiple shipping options and when selecting a specific one I need the user to provide a different address in the note, please see the images below:

These are the available shipping options:

enter image description here


I want to show this (and it has to be a required field)

enter image description here


I have seen this answer where a checkbox is used to show/hide the notes of an order on the checkout page:

enter image description here

By doing the following:

JavaScript

But this is not what I want as described above.

Any help would greatly be appreciated.

Advertisement

Answer

I figured it out. I have added comments to help future readers.

JavaScript
User contributions licensed under: CC BY-SA
2 People found this is helpful
Advertisement