I have a custom type with a numeric data type as defined below:
<cfproperty ftSeq="412" ftWizardStep="EC" ftFieldSet="EC" ftLabel="Estimated
EC Contribution" default="" hint="Est. EC Contribution"
name="est_ec_contrib" type="numeric" ftValidation="validate-number" />
Each time I load the editing page for this field, it sets the value to
"0,00". As you can see, that's a number. However, it's not a number
according to the validation rule which doesn't take into account spaces or
the comma instead of a full stop (or period for you Americans) as a decimal
separator.
I therefore would like to know two things:
- How easy would it be to alter the validation script to accept spaces and ,
instead of .
- and, Why is it every time I load that wizard page it defaults to a value
that won't pass the validation - what can I do to stop this?
Cheers,
-Phil
--
View this message in context: http://www.nabble.com/Number-format-validation-issues-tp24323966s621p24323966.html
Sent from the FarCry - Dev mailing list archive at Nabble.com.
Not sure if these will help, but maybe try setting ftDefault="0" (or
"0.00"). If that doesn't work, try ftIncludeDecimal="true". And if a
whole integer is what you'd prefer, try ftType="integer".
Regards,
--
Jeff Coughlin
Web Application Developer
http://jeffcoughlin.com
ftIncludeDecimal="true" only solved a small part of this.
In the database I have the value "3000000" which is being displayed by the
form as "3,000,000" - and that, coupled with validate-number crashes as a
comma isn't a number.
How can I stop it automatically formatting the number?
OR
Is the a better validation method I can use?
--
View this message in context: http://www.nabble.com/Number-format-validation-issues-tp24323966s621p24356755.html
There's an attribute that isn't in the documentation (but is now thanks to
my comment)
ftMask
My default was treating this as "999,999,999" so I sent this attribute as
"999999999" and all works fine
--
View this message in context: http://www.nabble.com/Number-format-validation-issues-tp24323966s621p24371816.html
> The current FarCry 5.3 roadmap includes a complete overhaul of
> formtools to standardise on jQuery (currently FarCry internals are a
> mix of extJS, prototype and jQuery). The Gods willing this will
> include:
>
> - jquery formtools standardisation (although its likely they will have
> a similar look by default)
> - a jQuery based validation framework (Jeff's suggested plugin is
> under consideration)
> - jQueryUI (http://jqueryui.com/) abstraction for theming (at least in
> the project, if not the webtop)
> - the ability to load and reference your own jQuery library into a
> nominated namespace (in case you have jQuery goings on that conflict
> with standard FarCry behaviour)
> - a new library picker with a variety of skinning and filtering
> options
Nice. If interested, here's a really good blog post from w3avenue
(thanks to Hal Helms for the link) regarding a "List of Really Useful
Plugins for jQuery Developers" which also has some form validation
options (I haven't tried them yet though).
http://www.w3avenue.com/2009/07/01/list-of-really-useful-plugins-for-jquery-developers/