word count

14 views
Skip to first unread message

Edward Mcallister

unread,
Jul 20, 2022, 10:16:47 AM7/20/22
to livecycle
Hi everyone, 

Can anyone assist. I need to programme a word count in a text box, just characters, not spaces, and I wondered if anyone can help. 

I've used the character limitations in the text box properties but that also counts spaces and so doesn't really work as I want it to.

Thanks in advance

Ed

Adam D.

unread,
Jul 20, 2022, 10:30:35 AM7/20/22
to live...@googlegroups.com, Edward Mcallister
Have you excluded nulls and " " from count?

Sometimes javascript functions better than using formcalc.



- Adam
--
You received this message because you are subscribed to the Google Groups "Adobe LiveCycle Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to livecycle+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/livecycle/CAN9JiwDxC7htyjHY0ZTQ-zkVJGTRm2jjgiBDqsut-Wdak%3DairA%40mail.gmail.com.

Duane Nickull

unread,
Jul 20, 2022, 12:32:59 PM7/20/22
to Adobe LiveCycle Developers, Edward Mcallister
Definitely agree.  Using Javascript regex is the easiest way to go.

Duane



--
******************************
CTO Hired Gun - speaking only for myself
s. Bootstrap 5, jQuery, HTML5, CSS3+, PHP, Node.js, Neo4J & more
t.  @duanenickull

NOTICE: This e-mail and any attachments may contain confidential information. If you are the intended recipient, please consider this a privileged communication, not to be forwarded without explicit approval from the sender.  If you are not the intended recipient, please notify the sender immediately by return e-mail, delete this e-mail and destroy any copies. Any dissemination or use of this information by a person other than the intended recipient is unauthorized and may be illegal. The originator reserves the right to monitor all e-mail communications through its networks for quality control purposes.

fred.pantalone

unread,
Jul 21, 2022, 1:00:45 PM7/21/22
to Adobe LiveCycle Developers

Adam D.

unread,
Jul 21, 2022, 1:36:04 PM7/21/22
to live...@googlegroups.com, fred.pantalone
The split function is the base where you need to go, (remove any blanks or null type characters) but as always if one needs a hand in a form one of us can muster something up.

I also have a bunch of forms yet to post to the group for various functions that may be useful, based from requests that i have seen. Will get to it soon as i can - i was away for a while.

One key thing to note is for simple forms, formcalc works good but has limitations and Adobe doesnt seem to want to grow it further as technology improves, javascript is constantly updated and its diversity to handle if and or is by far the way to go.

For Adobe's leads, I would like to see better SQL support and database connectivity in future releases.

PDF XML forms to be used as a standalone database would be the cats fancy...





- Adam

Duane Nickull

unread,
Jul 21, 2022, 11:20:12 PM7/21/22
to Adobe LiveCycle Developers, fred.pantalone
"One key thing to note is for simple forms, formcalc works good but has limitations and Adobe doesnt seem to want to grow it further as technology improves, javascript is constantly updated and its diversity to handle if and or is by far the way to go."

CAVEAT: I do not speak for Adobe nor do I claim to make decisions for them.  I am just trying to provide some background info as I understood it at the time.

I used to work for Adobe but have no loyalty to them as my last day was in 2011.  The rationale (as I understood it) was that we believed it was better to rely on JS (and it's future) as there were millions of skilled developers who could help write code.  This meant customers could have access to millions of skilled developers and code samples to help with their needs. The other option was to grow formcalc, which would have been ok but after the absorbing of Macromedia, they also (sort of) inherited ECMAScript, which is sort of a super set of JavaScript.  Supporting 3 pseudo programming languages (plus Cold fusion) seemed to be too much.

Because formcalc had been used by some customers and was in production, it was not an option to simply stop supporting it and leave those customers in a lurch.  We (Adobe) had to keep supporting the existing customer implementations.  Much like the issue of embedded fonts not being possible if others owned the fonts, Adobe was a victim of their own success plus an evolving tech scene where people wanted to constantly push boundaries.

Literally, there was no correct solution to this problem.  As part of the core developer outreach team, I agreed the best option was to support JavaScript, but also support the current formcalc, but not grow it beyond where it was.

Again, I do not speak for them, but from my understanding, I feel the best option was taken.  In a perfect world, there would only be one scripting environment as this would cut down on the need to support multiple standards.  The same can be said for the explosion of image formats (PNG, TIFF, JG, JPEG 2000, GIF, HEIC, SVG etc).  As a company, what do you do?  Support only one or two (and ruin interoperability) or add more interpreters to the client side to support all he options.

The quote "A person with one watch always knows what time it is; a person with two or more is never sure"

Sincerely,

Duane Nickull

Adam D.

unread,
Jul 21, 2022, 11:46:04 PM7/21/22
to Duane Nickull, Adobe LiveCycle Developers, fred.pantalone
Hey no worries here Duane, i know that Adobes option to move forward with JS / XML was well thought out and received. Thats why when I post an idea, amongst others we tend to lean there. My only "beef" was not further developing sql and standalone db within forms, but i speculate its coming.

Going forward, as Duane said, i think we all should try to rectify problems by using JS and as a community gradually delreciate formcalc until adobe considers it irrelevant. From my experience there is only a few instances where formcalc is useful, but for higher level orogramming its too archaic.



- Adam

Edward Mcallister

unread,
Jul 22, 2022, 3:08:07 AM7/22/22
to livecycle
Thanks Fred 

I will try this one. 

Best

Ed

Reply all
Reply to author
Forward
0 new messages