[ic] Adding products using a form

Tim Good tim.g at edsd.com
Thu Jul 6 13:00:09 EDT 2006


> -----Original Message-----
> From: interchange-users-bounces at icdevgroup.org 
> [mailto:interchange-users-bounces at icdevgroup.org] On Behalf 
> Of Stefan Hornburg
> Sent: Thursday, July 06, 2006 10:38 AM
> To: interchange-users at icdevgroup.org
> Subject: Re: [ic] Adding products using a form
> 
> Tim Good wrote:
> >>-----Original Message-----
> >>From: interchange-users-bounces at icdevgroup.org
> >>[mailto:interchange-users-bounces at icdevgroup.org] On Behalf 
> Of Stefan 
> >>Hornburg
> >>Sent: Thursday, July 06, 2006 9:25 AM
> >>To: interchange-users at icdevgroup.org
> >>Subject: Re: [ic] Adding products using a form
> >>
> >>Tim Good wrote:
> >>
> >>>I am trying to us a form to add items to the products table.
> >>>
> >>>Interchange 5.4.1 Perl 5.8
> >>>My form starts like:
> >>><form action="[area @@MV_PAGE@@]" method="POST"
> >>>enctype="multipart/form-data">
> >>> [form-session-id]
> >>><input type="hidden" name="mv_data_key" value="sku"> <input 
> >>>type="hidden" name="ui_hide_key" value="1"> <input type="hidden"
> >>>name="mv_data_table" value="products"> <input type="hidden" 
> >>>name="mv_data_function" value="insert"> <input type="hidden" 
> >>>name="mv_action" value="set"> <input type="hidden" 
> >>>name="mv_update_empty" value="1"> <input type="hidden" 
> >>>name="mv_data_fields" value="sku prod_group description category 
> >>>summary comment terms stamp location itemstart duration coa 
> >>>samplebutton username price minimum buynow weight packaging
> >>
> >>shipinfo
> >>
> >>>image image2 image3
> >>>image4 image5 image6 thumb image_large file1 file2"> [seti 
> >>>cancelurl]location.href=[page href="[cgi 
> referring_page"][/seti] <p 
> >>>align="center"><font color="red"> Below is a preview of
> >>
> >>your proposed
> >>
> >>>auction listing. By clicking on Submit you are agreeing to pay the 
> >>>posting fee described in [page href="[area
> >>
> >>pricing]"]Pricing</a>.<br>
> >>
> >>>Use <b>Submit</b> to actually submit if you are
> >>
> >>satisfied.<br></font>
> >>
> >>>        <input type="submit" name="operation" value="Submit"
> >>>class="search_button">
> >>>&nbsp;<input type="button" name="cancel" value="Cancel"
> >>>onClick='[scratch cancelurl]' class="search_button"> </p> [loop 
> >>>list="sku prod_group description category summary comment
> >>
> >>terms stamp
> >>
> >>>location itemstart duration coa samplebutton username 
> price minimum 
> >>>buynow weight packaging shipinfo image image2 image3 image4 image5
> >>>image6 thumb image_large file1 file2"] <input type="hidden" 
> >>>name="[loop-code]" value="[value [loop-code]]"> [/loop]
> >>>
> >>>This is passed to the same page at:
> >>>[elsif cgi operation eq 'Submit']
> >>>[if cgi tmp_sku]
> >>>[set ui_new_item]0[/set]
> >>>[else]
> >>>[seti sku][counter file=etc/post_item.count start=60600001][/seti] 
> >>>[/else] [/if] [perl]  $Values->{sku} = $Scratch->{sku}; [/perl]
> >>>
> >>>[update data]
> >>>[include file="etc/post_item" interpolate=1]
> >>>
> >>>Your item has been submitted. Click [page href="[area [scratch 
> >>>sku]]"]here to view your item.
> >>>
> >>>I am getting the error:
> >>>ugauction /cgi-bin/ugauction/member/post_item.html probable
> >>
> >>bad form
> >>
> >>>-- number of values min=0 (image5) max=2
> >>>(itemstart)
> >>
> >>You have itemstart _two_ times in your form.
> >>
> >>Bye
> >>	Racke
> >>
> > 
> > So if I follow this correctly this error message is a return from 
> > checking duplicate fields and (or) Checking for missing required 
> > fields?
> > 
> > If above is correct, then would my error message also mean that 
> > (image5) is missing and required?
> 
> You can not have duplicate fields when submitting one item. I 
> think you can leave out fields, although that doesn't makes sense.
> 
> 
> Bye
> 	Racke
> 
> 

Racke ... I can confirm (1) you were right on itemstart was what was keeping
the 
Data from being submitted (2) you can leave fields out or have them be
blank.

Thanks again for your quick response!
> 
> --
> LinuXia Systems => http://www.linuxia.de/ Expert Interchange 
> Consulting and System Administration ICDEVGROUP => 
> http://www.icdevgroup.org/ Interchange Development Team
> 
> _______________________________________________
> interchange-users mailing list
> interchange-users at icdevgroup.org
> http://www.icdevgroup.org/mailman/listinfo/interchange-users
> 



More information about the interchange-users mailing list