我正在创建一个活动表单,我想添加一个自定义属性。 这是一个正常的表单字段
<?= $form->field($model, 'password')->textInput() ?>
我希望它以
的形式出现<label class="input">
<i class="icon-append fa fa-envelope"></i>
<input type="password" name="email" placeholder="Password>
<b class="tooltip tooltip-bottom-right">Needed to verify your account</b>
</label>
以上是一个普通的html表单字段,我希望yii2活动表单类似
我试过了
<?= $form->field($model, 'email')->
textInput(["placeholder"=>"password"])->label(["class"=>"input"])?>
我坚持多么不好添加工具提示和图标
最终表单字段应该是
答案 0 :(得分:1)
您可以使用Options:
例如,
SLComposeViewController *fbCompose;
if ([SLComposeViewController isAvailableForServiceType:SLServiceTypeFacebook]) {
fbCompose=[[SLComposeViewController alloc]init];
fbCompose=[SLComposeViewController composeViewControllerForServiceType:SLServiceTypeFacebook];
[fbCompose setInitialText:@"My Score in AlphaMarics is"];
[fbCompose addImage:image];
[self presentViewController:fbCompose animated:YES completion:nil];
}
[fbCompose setCompletionHandler:^(SLComposeViewControllerResult result)
{
NSString * fbOutput=[[NSString alloc]init];
switch (result){
case SLComposeViewControllerResultCancelled:
fbOutput=@"You Post is cancelled";
break;
case SLComposeViewControllerResultDone:
fbOutput=@"Your post Posted Succesfully";
break;
default:
break;
}
UIAlertView * fbAlert=[[UIAlertView alloc]initWithTitle:@"Warning" message:fbOutput delegate:nil cancelButtonTitle:@"Ok" otherButtonTitles:nil, nil];
[fbAlert show];
}];