Hi, 

 you should try this in FormClass 


 public function setup(){
this->setWidgets(array(
'name' =>new sfWidgetFormInput());
}

$this->widgetSchema['allergy_code']->setLabel('Allegray code');

or in action


$form = new myForm();

$form->setLabels('allergy_code','Allegray code' );





> Date: Fri, 28 May 2010 10:01:55 +0100
> Subject: Re: [symfony-users] how to change text label attached to new link in 
>         embedRelation form
> From: p...@clearintent.co.uk
> To: symfony-users@googlegroups.com
> 
> Hi Stephane
> 
> Unfortunately, for some reason that isn't working.
> 
> I can access $this->widgetSchema['UglyName'] but setLabel doesn't
> change the name of the 'newLink'. I think it affects the main name of
> it but not the label of the new Link.
> 
> When I inspect the widget it has a positions array that I can access
> with ['UglyName']->getPositions() and the last position is
> 'newUglyName'
> getFields()  yields an array of widgets the last one beingis
> referenced by 'aNewUglyName' but I can't work out how to get at it to
> try setLabel on it.
> 
> 
> Any ideas?
> 
> Thanks,
> 
> Paul
> 
> On 28 May 2010 09:23, Paul Burdon <p...@clearintent.co.uk> wrote:
> > HI Stephane,
> >
> > Just the ticket.
> >
> > Thanks!
> >
> > Paul
> >
> > On 28 May 2010 00:24, Stéphane <stephane.er...@gmail.com> wrote:
> >> Hi,
> >>
> >> $this->getWidget($uglyName)->setLabel('my smart label');
> >>
> >> Cheers,
> >>
> >>
> >> Before Printing, Think about Your Environmental Responsibility!
> >> Avant d'Imprimer, Pensez à Votre Responsabilitée Environnementale!
> >>
> >>
> >> On Fri, May 28, 2010 at 12:25 AM, Tofuwarrior <p...@clearintent.co.uk>
> >> wrote:
> >>>
> >>> I have successfully use embedRelation to embed a relation in my form
> >>> BUT the new link at the bottom has a label next to it that says
> >>> NewUglyLongPropelObjectName  .
> >>>
> >>> How can I change this, I haven't set any new link anywhere so I'm not
> >>> sure how to change this.
> >>>
> >>> Is it a widget set somewhere.
> >>>
> >>> Anyone?
> >>> Deadline tonight, really rather not have this ugly mess spoiling
> >>> things.
> >>>
> >>> embedRelation -> Very cool!
> >>>
> >>> --
> >>> If you want to report a vulnerability issue on symfony, please send it to
> >>> security at symfony-project.com
> >>>
> >>> You received this message because you are subscribed to the Google
> >>> Groups "symfony users" group.
> >>> To post to this group, send email to symfony-users@googlegroups.com
> >>> To unsubscribe from this group, send email to
> >>> symfony-users+unsubscr...@googlegroups.com
> >>> For more options, visit this group at
> >>> http://groups.google.com/group/symfony-users?hl=en
> >>
> >> --
> >> If you want to report a vulnerability issue on symfony, please send it to
> >> security at symfony-project.com
> >>
> >> You received this message because you are subscribed to the Google
> >> Groups "symfony users" group.
> >> To post to this group, send email to symfony-users@googlegroups.com
> >> To unsubscribe from this group, send email to
> >> symfony-users+unsubscr...@googlegroups.com
> >> For more options, visit this group at
> >> http://groups.google.com/group/symfony-users?hl=en
> >>
> >
> 
> -- 
> If you want to report a vulnerability issue on symfony, please send it to 
> security at symfony-project.com
> 
> You received this message because you are subscribed to the Google
> Groups "symfony users" group.
> To post to this group, send email to symfony-users@googlegroups.com
> To unsubscribe from this group, send email to
> symfony-users+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/symfony-users?hl=en
                                          
_________________________________________________________________
Your E-mail and More On-the-Go. Get Windows Live Hotmail Free.
https://signup.live.com/signup.aspx?id=60969

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en

Reply via email to