bug adding/deleting ids from begining of form field names?
Posted: Wed Jul 16, 2008 9:29 am
That's the first time it is happened to me and I think is not such common thing, but:
1. I created hidden field with
2. Checked generated page with FF, it has - everything is great so far, 1 is added to beginning of all field names in the form, as usual.
3. Did print_r ($params) in target file and got ['id']=1, not ['id1']!
4. Changed line from to - now everything works fine, I have $params['id2'] now, not $params['id'] like in first time!
5. Next step - created, got in HTML and guess what? $params showed [id2]=>1 after submitting form!
Logic says, that there is a bug in routine that generates $params variable, deleting "1" (or whatever was added in the beginning of form fields) not only from beginning, but from all field name. Am I right?
1. I created hidden field with
Code: Select all
$this->smarty->assign('id1', $this->CreateInputHidden($id, 'id1', 1));
Code: Select all
<input type="hidden" name="1id1" value="1" />
3. Did print_r ($params) in target file and got ['id']=1, not ['id1']!
4. Changed line from
Code: Select all
$this->smarty->assign('id1', $this->CreateInputHidden($id, 'id1', 1));
Code: Select all
$this->smarty->assign('id1', $this->CreateInputHidden($id, 'id2', 1));
5. Next step - created
Code: Select all
$this->smarty->assign('id1', $this->CreateInputHidden($id, 'i1111d2', 1));
Code: Select all
<input type="hidden" name="1i1111d2" value="1" />
Logic says, that there is a bug in routine that generates $params variable, deleting "1" (or whatever was added in the beginning of form fields) not only from beginning, but from all field name. Am I right?