Posted by WISEOZ on December 5, 2007 at 9:24pm
Jump to:
| Project: | Spry Framework |
| Version: | 5.x-1.x-dev |
| Component: | Code |
| Category: | bug report |
| Priority: | critical |
| Assigned: | Unassigned |
| Status: | active |
Issue Summary
I'm not currently using this module but it looks really interesting. I'd like to use it for the user registration form where I'm also using CCK text fields with the nodeprofile module. Can these validations be used for Profile fields or the standard Username and E-mail fields?
Comments
#1
I'm attempting to do this right now.
I've enabled nodeprofile and successfully added a "billing information" content type (maximum population 1). I've added CCK fields to that, and so far all has been ok.
Except it doesn't do validation, like spry does which Is why I want to use the Spry module. Anyway I'm posting here my desired goal is similar to yours.
I installed the Spry module, and followed the installation instructions in the Read Me file (downloaded framework from Adobe, placed in spry/spry folder, enabled module, etc).
I added a new CCK field in my new nodeprofile content type, called credit_card_number.
However, the spry validation field doesn't seem to show any spry functionality for me. I can't see what I could be doing wrong. Here's what I did:
I selected:
- Spry validation text field
- Rows: 1
- Minimum character: 16
- Validtion type: Credit Card
- Counter Type: Remaining
- Format: Visa [though I'd like this to be done using active select, so use rcan select their credit card - but I'd like to get it to work for at least one first]
- Pattern: [I left blank]
- Required: yes
- Text processing: plain text
When I create a new instance of my 'billing information' content type, I see the field, but spry validation doesn't seem to do anything. Even the counter I enabled as a test doesn't display.
Please let me know if there's something else I should be doing - or something I should not be doing - in order to get this to work!
Thanks a lot --
Scott
#2
By the way, I looked at my source and found that the javascript vars are missing.
For instance, on the adobe spry demo pages, they always have something like the following at the very bottom of the page:
<script type="text/javascript"><!--
var theTitle = new Spry.Widget.ValidationTextField("theTitle", "none", {useCharacterMasking:true, regExpFilter:/^[^\'"\*]{0,15}$/, validateOn:["change"]});
var theDate = new Spry.Widget.ValidationTextField("theDate", "date", {useCharacterMasking:true, format:"mm/dd/yyyy", hint:"mm/dd/yyyy", validateOn:["change"]});
var theDuration = new Spry.Widget.ValidationTextField("theDuration", "integer", {useCharacterMasking:true, validateOn:["change"], allowNegative:false});
var theRating = new Spry.Widget.ValidationSelect("theRating", {validateOn:["change"]});
var theStudio = new Spry.Widget.ValidationSelect("theStudio", {validateOn:["change"]});
var theDescription = new Spry.Widget.ValidationTextarea("theDescription", {useCharacterMasking:true, minChars:20, maxChars:180, counterType:"chars_count", counterId:"Countvalidta1", validateOn:["change"]});
var checkboxes = new Spry.Widget.ValidationCheckbox("checkboxes", {validateOn:["change"], maxSelections:3});
var dvdVersion = new Spry.Widget.ValidationRadio("radios", {validateOn:["change"]});
//-->
</script>
Could the fact that this is missing be part of the problem?
#3
bump?
#4
No Javascript is outputed?
#5
Correct - none I could see, but was expecting to find (as in #2 above).
But I'm not an expert, and don't know how the Drupal spry module works differently than, say, adding spry-validated forms through dreamweaver. I only compared to the source of other pages with spry forms made that way, and wondered if this missing part could be the problem. (?)