Streaming live at 10am (PST)

Can I edit a form label's 'for' value?

Hello, wondering if I can get some help with this calculating form.

I’m trying to recreate an existing html/javascript form in Webflow, here’s the original, it’s hosted externally to our Webflow host, we’d like the form to work from within Webflow.

Form functionality - The user selects the options, fills Name and Email, submits the form and a result is calculated by a script based on the answers and delivered to the page. The result is not captured and does not get sent anywhere, it is just a front-end result (this is the part we need to change and have recorded by Webflow)'s normal form functionality).

I’ve built a simple test version of it here As best as I can, I have recreated the forms attributes and values but I have yet to get it working; it submits and records in Webflow but does not display the calculated score to the page.

I think the problem is because the original code is asking for the field input’s label’s ‘for’ value, as seen in this line of the script

Here’s an example of the original form field with that value being asked for.

And here is the Webflow output version for the same field

I’m pretty sure it’s the bit that I need to change so that the for=“node” can be for=“the ID” or for=“the name” of the input field. But there doesn’t appear to be a way of doing this. Is it possible?

If you want to view the page the calculating script is in the first embedded html item

Appreciate any thoughts on how to get this working.

Here’s the Share link

Did you get any better solution of calculation form on the same page?

Hi. We ended up getting some help and they modified our original script to work with the form rebuilt in Webflow. If you go to this page and study the page source and script you should be able to see what’s going on