Dynamic Form Names?

How would I add a dyanmic form name from the CMS fields? I need to name each form based on the campaign that I am setting up in the CMS. Any tips/hacks?

https://preview.webflow.com/preview/cameronroe?preview=046e9f3461679607a791919ecede55f6

Hi @cjroe

I’ve just had a look at your campaign template, looks like you have got it sorted now?

Stu

Hi @cjroe

You can pull any data from the CMS in your form using the following code:

<script type="text/javascript" language="JavaScript">
<!--
document.write('<input ');
document.write('   type="hidden" ');
document.write('   name="Campaign" ');
document.write('   value="NAME">');
//--> </script>

Replace the word NAME with the dynamic field you want to include in the form submission.

CloudApp

​Hope this is helpful.

2 Likes

Thanks. I actually ended up figuring that out! I used the embed block. Thank you!

1 Like

This topic was automatically closed after 60 days. New replies are no longer allowed.