I am using propel:generate-crud..etc and then propel:build-forms

Everything is working fine except I cannot seem to set the Lables.

I am able to change or setOptions, and change or set setAttributes, but 
when I try
to setLabels it does not reflect at all.

what is the correct syntax.
is it
$this->widgetSchema->setLabel('lname', 'Last Name');
or
$this->widgetSchema['lname']->setLabel('lname', 'Last Name');

??

class AccountsForm extends BaseAccountsForm
{
  public function configure()
  {
     
      // Schema
      $this->widgetSchema['active'] = new 
sfWidgetFormSelect(array('choices' => AccountsPeer::getActives()));
      $this->widgetSchema['lname']->setAttributes(array('size' => '20'));

      $this->widgetSchema->setLabel('lname', 'Last Name');
     
      // Validators    
      $this->validatorSchema['email'] = new sfValidatorEmail();   
      $this->validatorSchema['lname']->setOption('required', true);
      $this->validatorSchema['lname']->setOption('min_length', 5);
     
  }
}

Ant Cunningham wrote:
> are you usingthe CRUD generator? i think the default output is verbose 
> which means it doesnt just use 'echo $form' it actually writes out the 
> view like <label for="my_form_element">My Label</label>
>
> So if this is the case youll have to manually go in and change all 
> these. You can always generate the the shorter form with an option... 
> check the help for generate:crud.
>
>
> Atif Khan wrote:
>   
>> I am using propel Integration for my forms.
>>
>> Where and how can I change the labels in the configure function
>>
>> I tried
>>
>> $this->widgetSchema->setLabel('lname', 'Last Name');
>>
>> but it does not reflect on the page.
>>
>> Thank you
>> Atif
>>
>>     
>
>
>   

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

Reply via email to