1505 Posts in 474 Topics by 460 members
Form Questions
SilverStripe Forums » Form Questions » Password validation in CMS
Moderators: martimiz, Howard, Sean, Ryan M., biapar, Willr, Ingo, swaiba
|
Page:
1
|
Go to End | |
| Author | Topic: | 1493 Views |
-
Password validation in CMS

16 January 2009 at 10:25am Last edited: 16 January 2009 10:25am
Don't know if this is the right forum for this but... yeah... anyway...
For various reasons I have to do a custom made user system kind-of -thing. I have a dataobject which represent the member that looks like this:
<?php
class Medlem extends DataObject {
static $db = array(
'Fornamn' => 'Varchar',
'Efternamn' => 'Varchar',
...
'Losenord' => 'Varchar(64)'
);
static $has_one = array(
//'Avatar' => 'Image'
'MinOrganisation' => 'Organisation'
);function getCMSFields_forPopup() {
$fields = new FieldSet(
new TabSet("Root",
new Tab(
$title = 'Main',
new TextField("Fornamn", "Förnamn"),
...
new CalendarDateField("Medlemsdatum", "Datum för medlemskap")
),
new Tab('Medlemsuppgifter',
new HeaderField("Medlemsuppgifter"),
...
new ConfirmedPasswordField('Losenord','Lösenord',null,null,false,'Bekräfta lösenordet')
)
));
return $fields;
}
}
?>The problem is that the ConfirmedPasswordField doesn't validate. Seems like there is some javascript missing but I can't figure out how to get it there. Anyone who knows?
-
Re: Password validation in CMS

27 January 2009 at 9:04am
I'd say have a look at the popup that occurs with MemberTableField. Afaicr there's a confirmedpasswordfield as well, see how that works.
In most cases, js-validation of formfields did not work in the CMS (2.3 will be different I think), only on frontend. Not sure how it's with the passwordfield though - but I do know the popup of membertablefield has it - so I figure your solution must be there.
| 1493 Views | ||
|
Page:
1
|
Go to Top |


