[ic] Re-post: form problems

Ed LaFrance interchange-users@interchange.redhat.com
Fri Jun 7 09:52:01 2002


At 08:45 PM 6/6/2002 -0400, you wrote:
>X-No-Archive: Yes
>
>(I am re-posting this question to the list because I did not get any type of
>response. I do get an e-mail telling me my post has been accepted to the
>list.  I also get my own question in my In-Box, so I know I'm getting
>through.
>If there is any reason I'm getting no responses;
>I.E. Lack of information,
>Not clearly describing the problem,
>I ask silly questions,
>I don't seem to have shown any effort to solve the issue,
>I don't contribute any useful information to this list,
>I have lousy list etiquette,
>I have such a bad case of halitosis traces of the stench are carried along
>with my e-mails,
>Its exam week,
>My signature is offensive. . .
>
>PLEEEAASSEEE let me know ;-P . . . .)
>
>I have a foundation ic checkout type form that includes a check box to
>remove their chosen products, which zeros out the quantity of the displayed
>product description to ZERO by acting as a submit button when pressed.
>
><INPUT TYPE=checkbox NAME="[quantity-name]"
>onClick="this.form.action='[process-target]', this.form.submit()" VALUE=0>
>
>The problem is my form also has a profile called formcheck which checks the
>required text input fields:
>
><INPUT TYPE=hidden NAME=mv_form_profile VALUE="formcheck">
>
>[set formcheck]
>           &fail=@@MV_PAGE@@
>           fname=required Sorry, we need your first name!
>           lname=required Sorry, we need your last name!
>           [if scratch dealer]company=required Sorry, we need your company
>name![/if]
>           address1=required Sorry, we need your address!
>           city=required Sorry, we need your company name!
>           state=required Sorry, we need your State/Province!
>           email=required Sorry, we need your email address!
>           contact=required Sorry, we need to know how you would like to be
>contacted!
>           phone_day=required Sorry, we need your phone number!
>[/set]
>
>So when anyone tries click that "Remove" check box, they get their item
>listed twice and lots of red text next to their text input fields telling
>them they need to fill these fields out.  I have hunted through google for
>some good JavaScript properties, methods or event handlers for a clue.  I
>tried changing this.form.submit()" to this.form.reset()" but that wasn't
>very helpful as it just made the checkbox useless.  My JavaScript abilities
>are not so hot. Any suggestions?  HELP!!!!!!!

I would suggest you remove the hidden input for mv_form_profile and instead 
attach it to an mv_click action:

<input type=submit name=mv_click value="Submit Form">

[set Submit Form]
         mv_form_profile=formcheck
[/set]

In this way, clicking the 'remove' checkbox for a cart item will just 
remove it, without passing the whole form through the profile (that will 
only happen when they click "Submit Form").

- Ed L.



===============================================================
Increase profits from your Interchange store...
http://www.newmediaems.com/cgi-bin/nm/software_fus.html
===============================================================
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
===============================================================