Streaming live at 10am (PST)

Predefined Value for Text Area in Forms

Hey Everyone!

I’m trying to create a webflow form that has a predefined value (the message) which would be locked into a contact form and sent with other information the user will fill out (name, number, address, zip code, etc…)

I’ve tried to mess around with the custom attributes, but haven’t been successful so far. If anyone has a resolution that would be amazing. Here is an example of EXACTLY what I’m trying to do: https://p2a.co/pNJ7plo?ref=fed

Read only link: Webflow - Comment Generator V2

Quick note - If the predefined value isn’t available, I’m exploring an alternative Jquery solution for a simple “copy to clipboard” button that’ll copy the text and allow the user to paste into the message box.

If anyone has a good solution for this that would be awesome. Thanks Webflow community!

Hey Connor! Welcome to the forums!

Yes, this is definitely possible with Webflow. However, it will require a bit of custom code.

Basically, what you’re going to want to do is, in place of the Webflow text area element, place an embed element. From there you will want to insert the following code:

<textarea class="[your text area class]">Insert Your Message here.</textarea>

By doing this, you should have a result that is almost exactly what is shown on the example page. You could also insert data from the CMS by using the “Add Field” element in the top right corner of the Embed element (which appears when you are editing a CMS Template page).

Let me know if you need clarification. Full disclosure that I am tired right now, so I may not have made complete sense haha. Hope this helps! :slight_smile:

1 Like

Hey Tyler! First and foremost thank you a ton for your help! I used the HTML Embed element and the text appears to be working. However, I can’t seem to space the box to the appropriate length. Would you know how to increase the width and height of the box so it matches the previous one?

It appears that the “spacing” column on the right isn’t actually doing anything to this particular embed element. Thanks again for the help man! You’re awesome!