Development

#5220 ([patch] renderLabel, cannot overide "for" attribute)

You must first sign up to be able to contribute.

Ticket #5220 (closed defect: fixed)

Opened 7 months ago

Last modified 7 months ago

[patch] renderLabel, cannot overide "for" attribute

Reported by: jug Assigned to: fabien
Priority: minor Milestone: 1.2.1
Component: other Version: 1.2.0
Keywords: Cc:
Qualification: Ready for core team

Description

Hi,

If I want to define my own value for the id attribut of an input, I will write something like this :

<!-- ... -->

<? echo $form_field->renderLabel( 'The label', array('for'=>'my_own_id') ); ?>

<!-- ... -->

<? echo $form_field->render( array('id'=>'my_own_id') ); ?>

<!-- ... -->

But it won't as "for" attribute is overided in renderLabel... Except if using the following patch.

Regards,

Julien

Attachments

sfWidgetFormSchemaFormatter.class.php.patch (0.7 kB) - added by jug on 12/08/08 10:56:49.

Change History

12/08/08 10:56:49 changed by jug

  • attachment sfWidgetFormSchemaFormatter.class.php.patch added.

12/08/08 14:36:05 changed by FabianLange

  • qualification changed from Unreviewed to Ready for core team.
  • milestone set to 1.2.1.

looks ok for me

12/08/08 23:19:08 changed by FabianLange

  • status changed from new to closed.
  • resolution set to fixed.

(In [13843]) [1.1] fixed overriding for attribute of generated labels in sfWidgetFormSchemaFormatter. fixes #5220

12/08/08 23:19:21 changed by FabianLange

(In [13844]) [1.2] fixed overriding for attribute of generated labels in sfWidgetFormSchemaFormatter. fixes #5220

The Sensio Labs Network

Since 1998, Sensio Labs has been promoting the Open-Source software movement by providing quality web application development, training, consulting, and supporting several large Open-Source projects.