-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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() extra param #1029
Comments
Test it, Indeed return label tag: <?php
use Phalcon\Forms\Form,
Phalcon\Forms\Element\Text,
Phalcon\Forms\Element\Select;
$form = new Form();
$form->add(new Text("telephone", array(
'maxlength' => 30,
'placeholder' => 'Type your name'
)));
$text = $form->get('telephone');
echo $form->label('telephone');
echo PHP_EOL;
echo $form->getLabel('telephone');
echo PHP_EOL;
echo $text->getName(); output:
|
This is implemented in 1.3.0 |
Using this, how does one generate a label as |
echo $text->setLabel('Enter your number:'); |
@dreamsxin Thank you, I was studying Vokuro and I tried adding
but that just added a text attribute to the input. |
\Phalcon\Forms\Form::label(string $name) according to the doc, "Generate the label of a element added to the form including HTML"
I think it's need to have extra $attributes param, because it's mean to render HTML, so it will be consistent with render method.
ex:
but right now, what i have to do...
CMIIW
The text was updated successfully, but these errors were encountered: