<分区>
我们将创建一个服务表单,客户可以在其中输入详细信息、选择服务和支付现金。
-> Only one form is shown to user ->user select service with price and fill the other detail->Submitting the details , so data's are saved in backend->After saving data, form2 need to work automatically ,but the second form input value is depend on the first form input values and cash .
哪个是最好的实现方式?同一页面或不同页面中的两种形式?
我可以为此使用 ajax 以便客户需要停留在同一页面吗?
我们需要在检查元素中隐藏我们的商家 ID 和商家 secret
请举个例子。 请看我的两份表格 Form-1
<form method="post" action="" name="form1" id="form1">
Your name<input type="text" name="cl_name">
Service < input type="checkbox" name="check-1" value="10"> Wash
< input type="checkbox" name="check-2" value="10"> clean
<input type="submit" name="submit" value="submit">
</form>
中二
<form method="post" action="paymet_gateway_url" id="form2">
Name <input type="text" value="Form1 your name value" name="p_name" id="p_name">
Value<input type="text" value="Form1 service value (either 10 or 20 )" name="p_cash" id="p_cash">
<inpu type="hidden" value="return url" name="p_r_url">
<input type="submit" name="submit" value="submit">
</form>