-
Notifications
You must be signed in to change notification settings - Fork 5
ConfirmedPasswordField validation messages not working :( #1
Comments
Let me update the form templates and see if that does the trick. Since the form templates are the only thing that's different, that's probably what's causing the problem. Need to look at it closer but a quick look reveals that SilverStripe might require an explicit "$" on variables when used in a conditional, which currently isn't reflected in the templates. Will post up some changes soon. |
Hey Jeff :) Any luck finding 5 minutes to look at this issue? I have a website ready to go live and this is the only issue I still have. I've had a look at the Templates and can't see anything wrong... confused .com :( cheers heaps buddy! |
Hola! Can you give me a little more insight into how you’re using the $Message variable? What template are you using and how is it being used? Is it a script that utilizes the Form.ss template? One thing you could do is kill the forms directory in the Templates directory of your theme and see if it still breaks. Everything should work, although you’ll probably need to add back whatever form templates you need and customize the markup to work with Bootstrap. It’s possible that the $Message variable is working but requires a class to be present for the validation js to work right. Probably something I overlooked. :P Jeff On Apr 29, 2014, at 2:52 PM, nimeso [email protected] wrote:
|
Hey Jeff! thanks man yes I have tried turning off the forms folder in my theme and the ConfirmedPasswordField messages work fine... as soon as I turn on the form templates it stops working :( I'm not even sure which template ConfirmedPasswordField uses?... thinking its FieldGroup_holder.ss ? I wish I could give you more info... I'll have another look and see if I can debug it |
I'll see what I can do as well. Will need to setup a mockup of the ConfirmedPasswordField functionality. Is the an adding that uses this?
|
Sorry Jeff... whats does ' Is the an adding that uses this?' mean ;) |
Sorry. I was asking if there was an addon that uses the same functionality you're using.
|
Ok, sorry... I just deleted my last post, I was using the wrong website, lol... ok... as a simple test, pop this into your Page.php class and you can see what I mean. private static $allowed_actions = array (
'doForm',
'Form'
);
public function Form(){
$fields = new FieldList(
new ConfirmedPasswordField('Password', 'Password')
);
$actions = new FieldList(
new FormAction('doForm', 'Submit')
);
$validator = new RequiredFields('Password');
$Form = new Form($this, 'Form', $fields, $actions, $validator);
return $Form;
}
public function doForm(){
Debug::dump("yes");
} |
I don´t know if this is solved - but I changed "FormField_holder" to make a message appear on <% if Title %>
<% if Title %>$Title<% else %><% end_if %>
$Field
<% if Message %>$Message<% end_if %>
<% else %> |
Gonna review this soon and make any updates necessary. |
Seems that $Message is not working?
The text was updated successfully, but these errors were encountered: