Using <textarea>

Hi all,

bit of a random request and I'm not sure if it's possible but does anyone know if its possible to populate with data from another object in hype before the user inputs their data/text?

any ideas?



As in to preload content into a text area? Basically you can do something like this:

  1. Add a Rectangle element (a div) and remove all styling
  2. Edit the Rectangle's Inner HTML to include code like:
    <textarea id="mytextarea"></textarea>
  3. Add an On Scene Load action to Run JavaScript with code like:
    document.getElementById("mytextarea").value = "some text here";

This of course can be adjusted; it sounds like there's another object you want to set the value to, but it isn't clear what this object is or when you want it set... feel free to elaborate if that doesn't meet your needs.


Thanks @jonathan it works perfectly. I just replaced the “my text here” part of your example with a variable I am using to get data from the session storage and all my document text areas are nicely populated :+1:

1 Like

Excellent; glad that pointed you in the right direction.

1 Like