Place holder textarea

<span id="el_patints_comment">
<textarea data-table="patints" data-field="x_comment" name="x_comment" id="x_comment" cols="150" rows="2" class="form-control"

it display this code , how i can remove it

this is the code for my textarea in custom template:

<tr>

	 <!-- <td><label for="comment" id="cmnt">{{{caption comment}}} </label>
	  	{{{value comment}}}-->
	  	
	  	   <td>
	  	    <textarea id="cmnt" name="x_comment" cols="150" rows="2">
{{{value comment}}}</textarea>

	  </td>

</tr>

Note that this tag is original input HTML, read Custom Template Tags. If you just want the db value, you should use the {{{dbvalue xxx}}} tag, see the docs on how to use it.

HI, i want to use it as orignal HTML , becuase i want to connect it with javascript as here:

function startDictation() {
	// Check if the browser supports SpeechRecognition
	var recognition = new (window.SpeechRecognition || window.webkitSpeechRecognition)();
	
	// Set the language for recognition
	recognition.lang = 'en-US'; // You can change this to your preferred language
	recognition.interimResults = false; // Set to true if you want interim results

	// Start the speech recognition
	recognition.start();

	// When speech is recognized
	recognition.onresult = function(event) {
		// Get the recognized text from the event
		var transcript = event.results[0][0].transcript;
		
		// Populate the text field with the recognized text
		document.getElementById('cmnt').value = transcript; // Use value for <input>
	};

	// Handle errors
	recognition.onerror = function(event) {
		console.error('Speech recognition error detected: ' + event.error);
	};
}

// Ensure the document is ready before binding events
$(document).ready(function() {
	// Bind the startDictation function to a button click
	$('#startButton').click(function() {
		startDictation(); // Call the function when the button is clicked
	});
});

Then you may just add your own code, don’t use template tag for that field.

Hi,
when i use php file : the code is working perfectly: here is the code:

<?php
// voice_note.php
?>
<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<meta name="viewport" content="width=device-width, initial-scale=1.0">
	<title>Voice Note Example</title>
	<script>
		function startDictation() {
			// Check if the browser supports SpeechRecognition
			var recognition = new (window.SpeechRecognition || window.webkitSpeechRecognition)();
			
			// Set the language for recognition
			recognition.lang = 'en-US'; // You can change this to your preferred language
			recognition.interimResults = false; // Set to true if you want interim results

			// Start the speech recognition
			recognition.start();

			// When speech is recognized
			recognition.onresult = function(event) {
				// Get the recognized text from the event
				var transcript = event.results[0][0].transcript;
				
				// Populate the text field with the recognized text
				document.getElementById('cmnt').value = transcript; // Use value for <input>
			};

			// Handle errors
			recognition.onerror = function(event) {
				console.error('Speech recognition error detected: ' + event.error);
			};
		}

		document.addEventListener('DOMContentLoaded', function() {
			// Any additional setup can go here
		});
	</script>
</head>
<body>
	<table>
		<tr>
			<td><button type="button" onclick="startDictation()">Voice Note</button></td>
			<td>Comments</td>
			<td><textarea id="cmnt" ></textarea></td> <!-- This will be the text field -->
		</tr>
	</table>
</body>
</html>

and when i tray to put the code in my template as:

<td><button type="button" onclick="startDictation()">Voice Note</button></td>
			<td>Comments</td>
			<td><textarea id="cmnt" ></textarea></td> 

and also change it as:

<td><textarea id="cmnt" >{{{ vlaue comment}}}</textarea></td>  and also cha<td id="cmnt" >{{{ vlaue comment}}}</td> 

also it is not working

As explained:

what i want is : i want to store the the sound which register from the micraphone to this field comment as text