[ic] Updating Interchange Database Tables with a Form and required fields

Ed LaFrance interchange-users@lists.akopia.com
Thu Jun 28 11:44:01 2001


At 09:20 AM 06/28/2001 -0400, you wrote:
>Quoting bill@worldwideimpact.com (bill@worldwideimpact.com):
> > How do I make certain fields required when 'Updating Interchange Database
> > Tables with a Form'.
> >
> > I would like to make certain fields required and return a message to the
> > user if they have left a field blank. I have tried using mv_order_profile
> > but I can not get it to work. I can do this with a checkout page I just
> > don't know how to do it when updating a database.
> >
>
>Can't do it with 4.6.x, but 4.7.x adds a new check cycle, mv_form_profile.
>It operates the same way as an order profile, but happens before anything
>else.

That's good news! What I have done in earlier IC/MV versions is to just use 
a "submit" action on the form - this makes it behave much like the checkout 
page, which means that I can write a profile for validating fields and 
returning errors.  The profile contains a &fatal=yes, but no &final 
setting, and I use
&set=mv_successpage some_page

to direct the browser to a special page when I get a good submission.  On 
that page (as you probably guessed) is something like:

[tag flag write]foo[/tag]
[seti wrote_data][import table=foo type=LINE continue=NOTES]
key: [value key]
field1: [value field1]
field2: [value field2]
...
[/import][/seti]

[if scratch wrote_data]
[bounce href="[area cofirmed_page]"]
[else]
[bounce href="[write_failed_page]"]
[/else]
[/if]


This works well for adding new data.  I'm sure I will be corrected if I am 
wrong here, but it seems I remember experimenting and finding that [import] 
will update an existing record if you hand it an existing key... but don't 
take this as the final word on that.

- Ed L.


>--
>Red Hat, Inc., 3005 Nichols Rd., Hamilton, OH  45013
>phone +1.513.523.7621      <mheins@redhat.com>
>
>Experience is what allows you to recognize a mistake the second
>time you make it. -- unknown
>_______________________________________________
>Interchange-users mailing list
>Interchange-users@lists.akopia.com
>http://lists.akopia.com/mailman/listinfo/interchange-users

===============================================================
New Media E.M.S.               Software Solutions for Business
463 Main St., Suite D          eCommerce | Consulting | Hosting
Placerville, CA  95667         edl@newmediaems.com
(530) 622-9421                 http://www.newmediaems.com
(866) 519-4680 Toll-Free       (530) 622-9426 Fax
===============================================================