Dynamic text replacement: Form Entry to new Text


#1

Hi there,

we have a form on a specific page with a field “type”.
On the form confirmation page we want to insert a specific text, regarding on the input in “type”.
I guess we need to alter “type” for that, but I am uncertain how to do it.

My approach was the following, but it (obviously) didnt work:

<script>
function getURLParameter(type) {
  var wert; 
  if(type=="the good one") wert="nice guy";
  if(type=="the bad one") wert="bad guy";
  if(type=="the cool one") wert="cool guy";
    return wert; 
}
    
</script>