Problem with onsubmit ID
- by Liso22
I need an onsubmit to return false if what's written on the first field is a certain PHP value however the field has a strange id format and I'm not quite sure how to add it in the onsubmit.
This is the form, I didn't add the element ID to it:
<form class="questionform" name="questionform-0" id="questionform-0" onsubmit="if (document.getElementById('').value == '<?php echo $casi; ?>') return false;"
>
<textarea class="question-box" style="width:97%;" cols="20" rows="4" id="question-box-' . $questionformid . '" name="title" type="text" maxlength="80" size="28" value=""></textarea>
I tried many times but couldn't add it. How should I do it? Thanks