• twitter image
  • facebook image
  • youtube image
  • linkedin image
Language: CMS Made Simple Czech CMS Made Simple France CMS Made Simple Spain CMS Made Simple Hungary CMS Made Simple Russia CMS Made Simple Netherlands

All times are UTC




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: bug adding/deleting ids from begining of form field names?
PostPosted: Wed Jul 16, 2008 9:29 am 
Offline
Forum Members
Forum Members
User avatar

Joined: Wed Dec 27, 2006 12:47 pm
Posts: 115
Location: Telford, GB
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
Code:
$this->smarty->assign('id1', $this->CreateInputHidden($id, 'id1', 1));


2. Checked generated page with FF, it has
Code:
<input type="hidden" name="1id1" value="1" />
- 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
Code:
$this->smarty->assign('id1', $this->CreateInputHidden($id, 'id1', 1));
to
Code:
$this->smarty->assign('id1', $this->CreateInputHidden($id, 'id2', 1));
- now everything works fine, I have $params['id2'] now, not $params['id'] like in first time!

5. Next step - created
Code:
$this->smarty->assign('id1', $this->CreateInputHidden($id, 'i1111d2', 1));
, got
Code:
<input type="hidden" name="1i1111d2" value="1" />
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?


Top
 Profile  
 
 Post subject: Re: bug adding/deleting ids from begining of form field names?
PostPosted: Thu Jul 17, 2008 10:08 am 
Offline
Forum Members
Forum Members

Joined: Tue Jun 03, 2008 2:31 pm
Posts: 101
It's possible that you can't have 'id' in as a input field name or any combination of 'id'. It seems there are some reserved words that can't be used as form fields. I found having a form field name of 'action' will throw errors.

So basically try renaming the hidden field to something different.


Top
 Profile  
 
 Post subject: Re: bug adding/deleting ids from begining of form field names?
PostPosted: Wed Aug 13, 2008 2:06 pm 
Offline
Forum Members
Forum Members
User avatar

Joined: Wed Dec 27, 2006 12:47 pm
Posts: 115
Location: Telford, GB
yeh, I did that, and it worked. Just made a point for developers, that this part should be redone better in CMS MS


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
A2 Hosting