【问题标题】:Product amounts do not submit when there is a drop down menu有下拉菜单时不提交产品金额
【发布时间】:2015-08-23 17:34:33
【问题描述】:

我们有几个产品,第一个产品有一个与之关联的下拉菜单。

不知何故,这个下拉菜单阻止了从第二个产品提交数据。请看http://www.kalikalos.com/eStore/book_test.html

我们需要做些什么来完成这项工作?

<form name="_xclick" action="https://www.paypal.com/cgi-bin/webscr" method="post">

<input type="hidden" name="cmd" value="_xclick" />
<input type="hidden" name="business" value="info@kalikalos.com" />
<input type="hidden" name="currency_code" value="EUR" />

<input type="hidden" name="item_name" value="Facilitator_in_residence" />

<table width="90%" border="1" align="center">  
<tr><th>&nbsp;&nbsp;FIR PROGRAMME</th><th align="center"> FACILITATOR IN RESIDENCE</th><th width="80" align="center">N<sup>o</sup>. &nbsp;of Places</th><th width="70">Standard FIR <font color="#FF0000">&euro;165</font></th><th width="80" align="center">Early Bird FIR <font color="#FF0000">&euro;122.50</font></th><th width="80" align="center">Leisure FIR <small>(Less staff commitment)</small> <font color="#FF0000">&euro;235</font></th><th width="60" align="center">Artist, Scientist<br />or Writer in Residence <font color="#FF0000">&euro;295</font></th></tr>

<tr bgcolor="#FFFF66"><th><b><i><big>Facilitator-in-Residence</big></i></b> <br /><br /> from June through September &nbsp;

<table align="center">
<tr><td>
<input type="hidden" name="on0" value="Start_Date" /></td>
<td>
<select name="os0">
<option value="~~-">Select start date </option>
<option value="29May">29 May </option>
<option value="26June">26 June </option>
<option value="17July">17 July </option>
<option value="28Aug">28 Aug </option>
<option value="4Sept">4 Sept
</option>
</select>
</td>
</tr>

</table>  
</th>

<td><img src="thumbs/yoga_in_roundhouse.jpg" width="115" height="92" alt="" align="left" /></td>
<td> <input type="text" size="2" maxlength="3" name="quantity" /></td>
<td title="165"><label>
<input type="radio" name="amount" value="165" checked="checked" />
</label></td>
<td title="122.50"><label>
<input type="radio" name="amount" value="122.50" />
</label></td>

<td title="235.00"><label>
<input type="radio" name="amount" value="235.00" />
</label></td>

<td title="295.00"><label>
<input type="radio" name="amount" value="295.00" />
</label></td>
</tr>

<!-- Accommodations line -->

<tr bgcolor="#CCFF99">
<th align="center"><h3>Select Your Accommodation</h3> </th>

<td><img src="thumbs/RoomG_martiou.jpg" width="100" height="75" alt="" align="right" />&nbsp;</td>

<td align="center"><small><b>Please re-enter N<sup>o</sup>. of Places</b></small><input type="text" size="2" maxlength="3" name="quantity_1" /></td>
<td bgcolor="#FFFF99"><small>Standard retreat price incldues triple or quad  accomodation</small><br /> <label>

<input type="radio" name="amount_1" value="0" checked="checked" />
</label></td>

<td title="&euro;75/person"><label>Twin (&euro;75)

<input type="radio" name="amount_1" value="75" />
</label></td>

<td title="&euro;150"><label>Single (&euro;150)
<input type="radio" name="amount_1" value="150" />
</label></td>

<td title="&euro;.02"><label>Request Tent
<input type="radio" name="amount_1" value=".02" />
</label></td>    </tr> 
</table>
<br />


<center>
<input type="hidden" name="item_name_1" value="Accommodation" />

<input type="image" src="../eStore/paynow.jpg" name="submit" alt="Make payments with PayPal - it's fast, free and secure!" />
</center>

</form>

【问题讨论】:

    标签: html paypal


    【解决方案1】:

    我很乐意在这里为您提供帮助,但老实说,您的代码很难阅读。我建议在解决此问题之前,首先使用 div 和 css 样式而不是表格来重新处理此页面。不仅表格在用户方面通常很丑陋,而且您在这里使用的表格也没有多大意义(您有一个似乎只与您的第一行相关的表格标题。对于用户),这使得其他人难以阅读和排除您的代码。很抱歉,这不是目前对您最有帮助的建议,但我需要一些时间来阅读您在这里获得的乱七八糟的表格并找出您的问题所在。

    我一直在努力拼凑此表单上所有选项的确切用途,但在我看来,您可以选择用户想要购买的服务类型以及他们想要的程序.

    我个人在这里要做的就是将其分成两个单独的部分。使用

    <div class="form-section">
        <h2>Form Section Heading</h2>
        [contents of section of form here]
    </div>
    

    将您的表单分成两个合乎逻辑的、不同的组件。我还建议您考虑删除多余的数量字段,因为让用户输入相同的数字两次是糟糕的用户体验。

    您会发现文本字段或文本区域标签中的“占位符”属性将允许您插入占位符文本,告诉用户该字段的用途,而无需占用额外的屏幕空间。使用与您的单选按钮一致的文本来告诉用户这些按钮的作用(这不是最佳设计实践,但它比您在此处拥有的表格单元格、行和标题网络向前迈出了一大步)。

    您还需要阅读一些关于 CSS 的内容,以了解如何使用样式表而不是内联来设置 html 元素的样式。

    【讨论】:

    • 好的,我将根据您的建议处理代码并重新发布它,以便更容易阅读和理解。谢谢!
    猜你喜欢
    • 1970-01-01
    • 2017-06-11
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-05-09
    相关资源
    最近更新 更多