I have a menu of items and a DIV containing text boxes. All have unique IDs. When you click a button I want to populate said text boxes with info related to the button you clicked - I thought we’d figured this out back in the later part of the last century but apparently this is an advanced concept in webflow.
I’m using Gemini to ‘help’ me along with all this. You can’t do it from the button interactions so we’re trying to use Javascript custom code but running into trouble with some CORS setting which apparently Webflow is blocking.
Webflow offers several ways to handle button interactions and form field populations. The built-in Interactions panel allows you to create dynamic effects and state changes without custom code. For more complex functionality like populating text boxes based on button clicks, you can use Webflow’s native CMS features combined with conditional visibility, or implement custom code solutions through the Custom Code embed feature in the page settings.
For button-triggered text box updates, consider these native Webflow approaches:
Use conditional visibility to show/hide pre-populated text elements
Implement form field connections with Webflow’s CMS dynamic data
Utilize Webflow’s built-in interaction triggers and animations
If custom JavaScript is required, you can add it through the page settings > Custom Code section. Remember that any external API calls will need to follow proper CORS protocols and may require additional setup with your API provider.
Hopefully this helps! If you still need assistance, please reply here so somebody from the community can help.
OK, but how are there tutorials? - and really is this your “support?” - a forum?
“Use conditional visibility to show/hide pre-populated text elements” - this is exactly what i’m having to fall back on now after the CMS/JS failed.
I can’t believe populating text fields is this hard in 2025. I’ve been working on this now for weeks and now i’m having to go back to that initial idea because it’s the only one that might work.
And, you understand my problem here and you write “Implement form field connections with Webflow’s CMS dynamic data” - which is so ridiculously obtuse and over-complicated for what I want to do.
I chose Webflow because I thought it would be a sweet spot between building from scratch and some kind of template-based solution but my experience has been incredibly poor and I would not recommend it again.
“Utilize Webflow’s built-in interaction triggers and animations” - these are great for having things bounce around but they don’t seem to offer any useful functionality.
and you write - “Remember that any external API calls will need to follow proper CORS protocols and may require additional setup with your API provider” - yeah sure, how was ever going to know that or even have a clue such advanced stuff would be needed just to click on a box and have it show relevant text - this is 2025, it’s staggering.
Hey Simon, no need to be abusive to the AI.
It probably doesn’t have feelings, but it did give some good advice based on what you’ve provided.
A few things;
Webflow is a best-in-class page designer. It is not a programming environment or an app builder.
If you’re looking for something that focuses on building dynamic, programmatic interfaces, you might look at a platform like bubble. You’ll have a lot less control over how things look, but likely more in-designer control over how things behave.
What you’re building here is a simple, but custom piece of UX, where you’re modifying the value of inputs based on a user action. That is very simple to do in Webflow, but requires Javascript to do.
Gemini is a good approach, but since you’re hitting CORS errors, it sounds like you’ve gone far off the rails of what your description says you’re trying to achieve. FYI, CORS is related to security and resource access, such as fetching content from another website.
On Javascript? Millions. Just google “set a textbox value from javascript”..
Webflow has a phenomenal support department, which can help you with systems issues.
Use support.webflow.com to open a ticket. You’re in the community forum, which is where you want to be when you’re asking for peer advice on how to solve your problem.
As Dmitrii shared, it’s very important to follow the posting instructions and share your readonly designer link, for anyone to be able to help you. Since you’re doing JS work, share your published webflow.io staging links as well.