Joomla + RSForm get field values with Javascript

Job ID: 33498237

Budget: €30 – €250 EUR

I have a form created in RSForm. On the last page of the form I have to place a script that loads data from specific fields in the form. So I need to get the field values with Javascript, but I can't get this to work.

The script looks like this:

<script>
fetch('https://external.url?prijsbaddouche={totaal_douche_bad:value}&optiesbaddouche={if {keuze_douche:value}}{keuze_douche:value},{/if}&email={email:value}', {mode: 'no-cors'})
</script>

The script contains about 35 fields (textfield values, checkboxes and radio buttons). In the full briefing I can show all the fields.

The RSForm value fields only work after submitting the form, but I need the values already before submitting the form. Be aware that there are also if statements present.

I'm looking for someone that has experience with RSForm and Javascript.
Related categories: JavaScript Joomla HTML