Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[NFR] Phalcon\Forms\Form::label to support attributes #1937

Closed
troyswanson opened this issue Jan 29, 2014 · 3 comments
Closed

[NFR] Phalcon\Forms\Form::label to support attributes #1937

troyswanson opened this issue Jan 29, 2014 · 3 comments

Comments

@troyswanson
Copy link

It'd be cool if the Phalcon\Forms\Form::label() method supported an attribute parameter the way render() does.

The workaround for now is:

<label for="email" class="control-label"><?php echo $form->getLabel('email') ?></label>

I'd like to be able to do:

<?php echo $form->label('email', array('class' => 'control-label')) ?>
@troyswanson
Copy link
Author

I don't quite know how the trace works. Maybe it should be Phalcon\Forms\Element::label() that should have this feature. Sorry for any confusion - I'm still very new to Phalcon, but loving it so far. 😄

@troyswanson
Copy link
Author

Never mind, this is a dupe of #1029.

@troyswanson
Copy link
Author

Works like a champ in 1.3.0, btw. Thanks! 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants