[ic] Adding products using a form

Tim Good tim.g at edsd.com
Thu Jul 6 11:01:17 EDT 2006


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)

I have searched the groups and only come up with (as the
best match)in CVS:

User:      racke
Date:      2004-03-08 21:06:51 GMT
Modified:  lib/Vend/Table Editor.pm
Log:
weed out duplicates in ui_data_fields originating from bad
metadata,
causing error in item edit:
probable bad form -- number of values min=0 (wholesale)
max=2 (sku)

Revision  Changes    Path
1.53      +8 -4      interchange/lib/Vend/Table/Editor.pm

This is my exact error message but I can not figure out what
this is telling me.
Can someone please shed some light on this?

Tim Good
EDSD, LLC



More information about the interchange-users mailing list