form field validation

28 views
Skip to first unread message

mimilafl

unread,
Sep 17, 2009, 6:49:21 AM9/17/09
to CenoPDF Support Group
hey folks-

your software rocks [purchased earlier this year]. very easy to use
and i was able to figure out a few javascript codes for some forms
already. plus, your sample order form was very helpful with the
javascript codes currently used and it was very easy to understand
what the calcs/functions were doing and so forth. besides, if i had
issues, i was able to google for specific js code & found the answers
in mins. -or- @ most a day. so, again, very pleased w/your product
thus far.

now that the intros are over, i only have one more query. i was
actually getting a headache trying to decipher all the jargon on the
websites that came up for this particular query over the past few
days; decided to sign up w/your forum.

this was actually a fluke ==> i created a form with basic calcs {VERY
simple one-page reimbursement type of report, if you will, so very few
fields and everything is straight forward with simple math--a few
addition, multiplic. fields, etc.--so nothing fancy}. anyway, the
fluke was that i inadvertently entered a "-" sign when i was running
the final tests. so, up to that point, the tests were all done using
plain whole POSITIVE numbers [integers] like "4" receipts attached,
etc. all the text fields that are to be used for #s were formatted
using your straightforward "format" tab.

the problem now is that we do NOT want the field to accept the "-" or
even a decimal point. we, of course, now realize/have learned the
issue is NOT the format but the validation. ironically, we even went
back in - and for the heck of it - INTENTIONALLY entered the "-" and
decimal points in your sample order form's items fields. we actually
started to laugh when your form accepted them/still calculated the
totals, which made absolutely no sense. if a grocery store--for
instance--used your form, it would end up paying the customers for
their purchases instead of the other way around (smile).

so we are hoping that, perhaps, whoever created your sample order form
just assumed people would ONLY enter whole positive #s for the five
items. i really do hope there is a [simple] way to restrict these two
characters that we almost missed {meaning, we will have to go back to
two other forms and fix those, as well}.

in closing, you should know we are new to javascript and will probably
never use it unless absolutely necessary as it relates to creating
forms with your product. [we use ms office suite and do not really
need javascript for anything else]. after having exhausted those
searches & trying to understand all of the function isnumber/chknumber/
isnan [excuse the spelling if i am incorrect, i already closed out of
the other tabs in browser], my head is spinning. so, if you can
imagine, those were waaay over our heads and not as straightforward as
the other simple calcs we have learned since purchasing the software.

sorry for the length but it was therapeutic, i s'pose; going over our
journey and rehashing the exposure we have had from this interesting
new world. perhaps we will also have a better appreciation for
websites going forward. it is actually kind of cool to know how those
form fields were probably created when one makes an online purchase,
etc. [when you get error msgs because a field will not accept your
data entry, for example] so thx for opening our eyes to this very
unique part of computers and technology.

okay....i am going to sleep now ;o) and i hope i see a nice response
in my e-mail inbox to this query when i awake later today {and
certainly NOT as confusing as those things i mentioned above}.

take care, folks, and keep up the good work. [p.s., i even used your
combo list in one form for a drop-down selection w/five things from
which to choose...sweet]---and very classy looking--thx, again :o) .

MLA

CenoPDF Support

unread,
Sep 17, 2009, 12:03:27 PM9/17/09
to cenos...@googlegroups.com
Hi MLA,

Thanks for the message. I like your post and hope you had a great night
sleep.:)

To summarize your question, basically you want to limit text boxes with
certain characters. We actually have an example about how to do this:
http://www.lystech.com/webhelp/Content/restrict-character-from-text-box/defa
ult.htm

Basically you want to control the value of event.change in above code. Hope
this can give you some idea. In your Keystroke trigger, you probably want to
filter out anything other than 0-9.

Let me know if you need more help.

Thanks,
Yang
No virus found in this incoming message.
Checked by AVG - www.avg.com
Version: 8.5.409 / Virus Database: 270.13.102/2377 - Release Date: 09/16/09
17:49:00

Yang Lu

unread,
Sep 17, 2009, 12:10:43 PM9/17/09
to cenos...@googlegroups.com
To save you some time, the regular expression in this link
http://www.lystech.com/webhelp/Content/restrict-character-from-text-box/defa
ult.htm

should be /[^0-9]/ in your case.

See this link for more information about Negated Character Classes in case
if you are not familiar with regular expressions:
http://www.regular-expressions.info/charclass.html

mimilafl

unread,
Sep 21, 2009, 5:11:14 AM9/21/09
to CenoPDF Support Group
good day, Yang -- thx for the info. it looks like the cenopdf help
that comes up w/in word, excel, etc. is a lot different {not as
robust???} from the link you provided. i actually downloaded/saved it
as a pdf help manual, so whenever we get the chance, we will certainly
look thru that in addition to the help w/in the ms office apps.

of course it worked, and now i am even more pleased with your product
[if that is possible] :o) . the only odd thing is that all the blog
posts we saw {some, even from the early 2000s, etc.???} kept referring
to all those functions w/nan this or chknumber that and so forth.
plus, it always seemed like each subsequent blogger {and/or responder,
as it were} would try to "one up" the person who submitted the
previous equation(s). it was pretty funny to read such silliness
amongst such [intelligent] people (smile). but they were very
passionate ==> "no, no, that is not right....all you have to do is
replace _____ with isnan; why would you want to include ________;
etc." do you see why we were UTTERLY confused? so, again, this was
very much appreciated [and certainly smaller (eqns)/easier to
understand than what those other tech-types were posting...the poor
things :o) ].

have a productive week and thx tons for your assistance. best
regards-
MLA

On Sep 17, 12:10 pm, "Yang Lu" <y...@lystech.com> wrote:
> To save you some time, the regular expression in this linkhttp://www.lystech.com/webhelp/Content/restrict-character-from-text-b...
> ult.htm
>
> should be /[^0-9]/ in your case.
>
> See this link for more information about Negated Character Classes in case
> if you are not familiar with regular expressions:http://www.regular-expressions.info/charclass.html
>
> Yang
>
> -----Original Message-----
> From: cenos...@googlegroups.com [mailto:cenos...@googlegroups.com] On
>
> Behalf Of CenoPDF Support
> Sent: Thursday, September 17, 2009 9:03 AM
> To: cenos...@googlegroups.com
> Subject: RE: form field validation
>
> Hi MLA,
>
> Thanks for the message. I like your post and hope you had a great night
> sleep.:)
>
> To summarize your question, basically you want to limit text boxes with
> certain characters. We actually have an example about how to do this:http://www.lystech.com/webhelp/Content/restrict-character-from-text-b...
Reply all
Reply to author
Forward
0 new messages