Update Code in Body of Page from User Input

I would like to update the custom code’s product ID based on the entry submitted by the user.

This is for internal testing so doesn’t need to be pretty. I need to change the number inside toggleWidget to the user’s input.

<div>

<span id="plopWidget"></span>

<button id="getPlop" class="get_plop" onclick="toggleWidget(2587)"></button>

<script src="https://get-plop.s3.eu-west-1.amazonaws.com/plop/widget/library.js"></script>

</div>

Here is my site Read-Only: Webflow - Plop

@allenwixted - it depends on what type of element the user is providing entry with. Is it a select, checkbox, text field, etc…?

However, this can be achieved with a bit of JavaScript easily: