Re: Passing values to renderElement

2007-07-22 Thread peterhf

Of course!! Thanks for the help. BTW, had to change id to something
else as it was conflicting with another id.

Peter -

On Jul 20, 3:53 pm, francky06l [EMAIL PROTECTED] wrote:
 renderElement('representation_type_select', array('id' = $id))

 On Jul 20, 8:26 pm, peterhf [EMAIL PROTECTED] wrote:

  I have an, representation_type_select.thtml, which consists of a
  selectTag.

  ?=
  $html-selectTag(
  $model_name . '/type_' . $id,
  array(
'option_1' = 'option_1',
.
.
.
'option_n' = 'option_nr'
 ),
'',
array('id' = 'type_' . $id, 'size' = '6',
  'multiple' = 'multiple', 'class' = 'classname'),
null,
false,
false
  );
  ?

  This select tag is used multiple times in a form and its name needs to
  be different for each use, therefore the $id variable. The
  $model_name is set in the controller and appears correctly in the
  rendered html. However, I have not been able successfully pass the
  value of $id to the $this-renderElement('representation_type_select'). The 
  value of $id does

  not appear as a postfix to either 'type_' in the html. I tried ?php
  $id = '1'; echo $this-renderElement('representation_type_select'); ?

  Thanks in advance for any suggestions.

  Peter -


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Passing values to renderElement

2007-07-20 Thread francky06l

renderElement('representation_type_select', array('id' = $id))

On Jul 20, 8:26 pm, peterhf [EMAIL PROTECTED] wrote:
 I have an, representation_type_select.thtml, which consists of a
 selectTag.

 ?=
 $html-selectTag(
 $model_name . '/type_' . $id,
 array(
   'option_1' = 'option_1',
   .
   .
   .
   'option_n' = 'option_nr'
),
   '',
   array('id' = 'type_' . $id, 'size' = '6',
 'multiple' = 'multiple', 'class' = 'classname'),
   null,
   false,
   false
 );
 ?

 This select tag is used multiple times in a form and its name needs to
 be different for each use, therefore the $id variable. The
 $model_name is set in the controller and appears correctly in the
 rendered html. However, I have not been able successfully pass the
 value of $id to the $this-renderElement('representation_type_select'). The 
 value of $id does

 not appear as a postfix to either 'type_' in the html. I tried ?php
 $id = '1'; echo $this-renderElement('representation_type_select'); ?

 Thanks in advance for any suggestions.

 Peter -


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---