trying to add a time field to a form using formit, but the isDate validator seems to be having trouble with the colon used to separate hour from minute, I have:
[[!FormIt?
&hooks=`formittest,nospam,email,redirect`
&emailTpl=`StagetteEmailTpl`
&emailTo=`[email protected]`
&emailUseFieldForSubject=`1`
&redirectTo=`146`
&validate=`
name:required,
email:email:required,
phone:required,
stagettedate:required:isDate=^%Y-%m-%d^,
guests:required:isNumber,
bridesname:required,
arrivaltime:required:isDate=^%H:%M^`
]]
when the form is submitted as above, the time field is returned without the minutes, the colon in the format is not be escaped properly. [If I remove the format the time will be returned properly]
how do I escape the : in the validator?
*** Not just websites, we also create signage, banners, print, trade show displays and more! ***
Sean Kimball CLP, CLS.
Technical Director / Sr. Developer | BigBlock Studios
._______________________________________________.
Bigblock Studios
http://www.bigblockstudios.ca Web site design & development.
27-1300 King Street East. Box 167 Oshawa, Ontario L1H8J4 Canada.
phone/fax: 905-426-5525
-
☆ A M B ☆
- 3,112 Posts
you mean, if you use
arrivaltime:required:isDate=^%H/%M^
it will work?
Rico
Genius is one percent inspiration and ninety-nine percent perspiration.
Thomas A. Edison
MODx is great, but knowing how to use it well makes it perfect!
www.virtudraft.com
Security, security, security! |
Indonesian MODx Forum |
MODx Revo's cheatsheets |
MODx Evo's cheatsheets
Author of
Easy 2 Gallery 1.4.x,
PHPTidy,
spieFeed,
FileDownload R,
Upload To Users CMP,
Inherit Template TV,
LexRating,
ExerPlan,
Lingua,
virtuNewsletter,
Grid Class Key,
SmartTag,
prevNext
Maintainter/contributor of
Babel
Because it's hard to follow all topics on the forum, PING ME ON TWITTER
@_goldsky if you need my help.
Quote from: goldsky at Nov 14, 2012, 09:15 PMyou mean, if you use arrivaltime:required:isDate=^%H/%M^
it will work?
yes - exactly.
*** Not just websites, we also create signage, banners, print, trade show displays and more! ***
Sean Kimball CLP, CLS.
Technical Director / Sr. Developer | BigBlock Studios
._______________________________________________.
Bigblock Studios
http://www.bigblockstudios.ca Web site design & development.
27-1300 King Street East. Box 167 Oshawa, Ontario L1H8J4 Canada.
phone/fax: 905-426-5525
-
☆ A M B ☆
- 3,112 Posts
Wild guess, but seems true:
FormIt uses
colon (:) to separate the validations, so it is
the delimiter of the validators.
Rico
Genius is one percent inspiration and ninety-nine percent perspiration.
Thomas A. Edison
MODx is great, but knowing how to use it well makes it perfect!
www.virtudraft.com
Security, security, security! |
Indonesian MODx Forum |
MODx Revo's cheatsheets |
MODx Evo's cheatsheets
Author of
Easy 2 Gallery 1.4.x,
PHPTidy,
spieFeed,
FileDownload R,
Upload To Users CMP,
Inherit Template TV,
LexRating,
ExerPlan,
Lingua,
virtuNewsletter,
Grid Class Key,
SmartTag,
prevNext
Maintainter/contributor of
Babel
Because it's hard to follow all topics on the forum, PING ME ON TWITTER
@_goldsky if you need my help.