public function setValue($value) : htmlTextArea
La méthode setValue permet de renseigner la valeur d'un champ de formulaire.
Voir aussi htmlSelect->setValue, htmlInput->setValue.
<?php
require_once('../classes.php');
$document = new htmlDocument();
$form = $document->append(new htmlForm());
$nom = $form->append(new htmlInput('nom'));
$pwd = $form->append(new htmlInput('pwd', 'password'));
$txt = $form->append(new htmlTextArea('txt'));
$nom->setValue('nom');
$txt->setValue('Commentaire');
$document->output();
<form method="POST">
<input name="nom" id="nom" type="text" value="nom">
<input name="pwd" id="pwd" type="password">
<textarea name="txt" cols="80" rows="5">Commentaire</textarea>
</form>