[ic] Adding products using a form

Stefan Hornburg racke at linuxia.de
Thu Jul 6 11:25:22 EDT 2006


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


-- 
LinuXia Systems => http://www.linuxia.de/
Expert Interchange Consulting and System Administration
ICDEVGROUP => http://www.icdevgroup.org/
Interchange Development Team



More information about the interchange-users mailing list