[ic] Strip spaces from email

Paul Jordan paul at gishnetwork.com
Thu Apr 15 11:38:57 EDT 2004


Ethan E. Rowe (ethan at the-rowes.com) wrote:
>> Quoting Ethan E. Rowe (ethan at the-rowes.com):
>>> Susan Misnick wrote:
>>>
>>>> Hi, I'd like to strip leading or trailing spaces from the email
>>>> field, which seems very straightforward, but I can't figure out
>>>> where to put the code.  Hints? Thanks,
>>>> Susan
>>>
>>> It depends on what action is being performed; if this is in
>>> relation to posting an order to the database, one thing would be to
>>> put it in /etc/log_transaction.  However, if you want to do
>>> something in a less sensitive area, you could put a little
>>> [perl]...[/perl] block in the form profile with a regular
>>> expression to trim the leading spaces.  I'm still on the steep part
>>> of the Interchange learning curve myself, however, so it's highly
>>> possible somebody could offer you a more elegant solution.
>>
>> It's as easy as:
>>
>>         [value name=email filter=strip]
>>
>
>    Ya, ya... so IC is pretty amazing.. we know that.  But in the
> interest of increasing IC knowledge tell me something.. I can easily
> search icdevgroup.org and see the value tag and all the information
> there which includes the 'filter' parameter. But how would one know
> that strip is a valid value for filter ? Of course it just so happens
> that there is a filter tag and in reading that information there is
> some verbiage about the strip parameter and it is what would one
> imagine; a couple of regexp.  But in the general sense of IC how
> would someone know that strip is a valid value for the filter
> attribute of the
> value tag ?
> Just use above normal common sense and logic of what would seem
> reasonable to be there ? Or is it time for someone to write a good
> reference book for all us weekenders to use ?
>
> Jon


Value uses Filter. At that point, there is no need to link Value to 'strip'.
Value does not use 'strip', Filter does. If we started linking things like
this, it would end up being exponentially more confusing, and cumbersome to add
to, which means even less additions.

Also, if you use the 5.0 docs, they will fulfill your wanton desires. Use the
frames version, search for 'value' in the tag reference doc. "Filter", within
the 'value' description will be clickable, taking you to a description of
Filter. Then, Filter is yet again clickable, and I presume clicking it take you
to a list of valid Filters... Doh! that particular link is broken though. It
points to itself :(  I guess our wanton desires will go unfulfilled today! and
you must manually search for Filter.

It would be nice if the docs were easier to update, not "made better" but just
easier to update. For example, I could have just taken 1 minute to fix that
link for everyone and I would have been happy to do it. The wiki, at least for
me was always excruciating slow, or the html was busted sending stuff way off
the screen, had way to many options that ultimately was a huge turnoff. And,
for yous that saw my spread in that calendar, you know slow wikis is on of my
top ten turn offs. Same with bugzilla. Overcomplication leads to underuse, but
despite recent news coverage, Overcomplication does not lead to dry itchy
scalp.

Good luck!

Paul


PS, I use the google bar to find keywords in the 5.0 docs, if you wondering how
to search the framed version.







More information about the interchange-users mailing list