How to pass html text as variable into forms

Hello.
You can also use the Custom Input activity to display a HTML form.
Here I shall introduce this activity, that it seems to be useful to me.
It could be find in the group UIPath.Core.Activities.CustomInput.
This requires the path to the HTML file defining your HTML form.
The output argument can be a new result string variable.
Please see the next picture:

Using this method may need few knowlege of HTML and / or scripting.
And of course, the appearance of the form could be still improved.
I had created a Form.html WEB page with the following content:

Form.html (1.4 KB)

<!-- saved from url=(0016)http://localhost -->
<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <title>Choose Your Message</title>
</head>
<body>
	  <form>
			<label>Promote: </label> 
			<input type="text" id="ID_TEXT1" autofocus="true"> 
			<br>
			<div id="ID_DIV1">
			<center>
				<p style='background-color:rgb(0, 204, 255);color:White;position:relative;top:-10px;border: 5px solid white;border-color: #96D4D4;border-style:outset;'>
					cmi"+promote+"
				<br></p>
			</center>
			</div>
	  	<input type="submit" id="ID_OK" value="Validate" onclick="validate()">
	  </form>
	  
	  <script type="text/javascript"> 
	  	function init_controls(){ 
			  // Init your controls here
				document.getElementById("ID_TEXT1").onkeyup = function(event){
					var promo = event.target.value.toString(); 
					var text = document.getElementById("ID_DIV1"); 
					text.innerHTML = "<center>" + 
						"<p style='background-color:rgb(0, 204, 255);color:White;position:relative;top:-10px;border: 5px solid white;border-color: #96D4D4;border-style:outset;'>" + 
						"cmi " + promo + "<br></p></center>"; 
				}; 
			} 

			function validate(){
				var ctrl1 = document.getElementById("ID_TEXT1"); 
				var message = ctrl1.value; 
				window.external.setResult(message); 
				document.close(); 
			} 

			init_controls(); 
	  </script>
</body>
</html>

Hope it helps. Best regards, Adrian