PITS /
00726: Coding error in wikiform.php version 1.45
Summary: Coding error in wikiform.php version 1.45
Created: 2006-04-25 21:03
Status: Closed
Category: Cookbook
From: rflanary
Assigned:
Priority: 4
Version: n/a
OS: n/a
Description: An apostrophe is missing before value= on line 264 (in EntryForm function).
Current line: $rows[$j] = (isset($rows[$j])) ? " value='".$rows[$j]."'" : '';
Corrected line: $rows[$j] = (isset($rows[$j])) ? "' value='".$rows[$j]."'" : '';
This bug causes "value=" to appear in form fields when using ([1-9][0-9]*) field type multiple times.
I have also linked this PITS from the relevant page Cookbook.WikiFormsBugs. --Henning October 19, 2006, at 10:32 AM
I don't remember fixing this, but I think it's correct in version 1.0.52. The code reads:
for($j=0;$j<$m[1];$j++) { $rows[$j] = (isset($rows[$j])) ? " value='".$rows[$j]."'" : ''; $out[] = "<input type='text' size='$col' name='". $f[$i]['element']."[]'".$rows[$j]." />"; }
Note the extra apostrophe in "[]'". If it's added in the value=' part, I think it causes an error if a row is empty. jr March 22, 2007, at 07:12 PM