How can I change the template of a form in sfDoctrineGuardPlugin?
How can I change the template of 开发者_Go百科a form in sfDoctrineGuardPlugin?
That is, I need to change the HTML (class, id) of the input elements (username, password) of a login form provided by sfDoctrineGuardPlugin.
I've changed apps/app_name/modules/sfGuardAuth/templates/singinSuccess.php
, but it then just echoes $form
(I need to change contents of that part - $form
):
<form action="<?php echo url_for('@sf_guard_signin') ?>" method="post">
<table>
<?php echo $form ?>
</table>
<input type="submit" class="go_button" value="ir" />
<a href="<?php echo url_for('@sf_guard_password') ?>"><?php echo __('Forgot your password?') ?></a>
</form>
(It really should be something like changing a _form.php => I can't find this, though :S)
Thank you all for any answers provided =)
In the sign in form class (forget it's name), there will be something like:
'username' => new sfWidgetFormInput(array(), array())
Modify that to:
'username' => new sfWidgetFormInput(array(), array('id' => 'jibbly', 'class' => 'wibbly'))
精彩评论