Jump to content

Control hoping to previous Form Field?!


doubledee

Recommended Posts

I've got something really funky going on with one of my Forms, and have no clue what the problem is?!  :o

 

My Q&A Form has 5 dynamically generated TextAreas.

 

If I click on a TextArea, control immediately hops to the *previous* TextArea.  (I am NOT using any JavaScript.)

 

Anything obvious that might cause that?

 

Normally I would "debug" in NetBeans, but this weird "Field Hopping" behavior doesn't appear to be firing any code, so there is no way I can debug it...

 

 

Debbie

 

Link to comment
https://forums.phpfreaks.com/topic/261778-control-hoping-to-previous-form-field/
Share on other sites

The problem seems to be coming from here...

// Display Q&A.
foreach($thoughtsArray as $questionNo => $qaArray){
// Build Question.
echo '<label for="question' . $questionNo . '">' . $questionNo . '.) ' . $qaArray['questionText'] . "\n";

// Build Answer.
echo '<textarea id="question' . $questionNo . '"  cols="60" rows="2">';
//	echo '<textarea id="question' . $questionNo . '" name=answer[' . $qaArray["questionID"] . ']" cols="60" rows="2">';
//								echo (isset($questionNo) ? htmlentities($qaArray['answerText'], ENT_QUOTES) : '');
echo "</textarea>\n\n";

 

 

If I take out the id= part in this line above things go back to normal...

	echo '<textarea id="question' . $questionNo . '"  cols="60" rows="2">';

 

Any idea what is happening?!

 

 

Debbie

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.