我有一个网站有多种方式可以访问我们的“向我发送电子邮件以获取更多信息”表单。 在表单上,它有一个复选框列表,他们可以检查他们想要通过电子邮件发送更多信息。是否可以根据他们来自哪个页面来预先检查复选框?预先核对复选框
例如,他们访问我们的“产品12”页面并点击表格的链接,并且有一个复选框可以接收有关产品12的更多信息,因为他们从产品12页面。
这里是我的表单代码:
<form id="formElem" name="formElem" action="" method="post">
<fieldset class="step">
<legend>Personal Details</legend>
<p>
<label for="fullname">Full Name</label>
<input id="fullname" name="username" />
</p>
<p>
<label for="company">Company Name</label>
<input id="company" name="company" />
</p>
<p>
<label for="title">Title</label>
<input id="title" name="title" />
</p>
<p>
<label for="phone">Phone Number</label>
<input id="phone" name="phone" />
</p>
<p>
<label for="email">Email</label>
<input id="email" name="email" placeholder="[email protected]" type="email" AUTOCOMPLETE=OFF />
</p>
</fieldset>
<fieldset class="step">
<legend>Products I'm interested in...</legend>
<p>
<input type="checkbox" name="telematics" value="telematics">Telematics<br>
</p>
<p>
<input type="checkbox" name="controllers" value="controllers">Controllers<br>
</p>
<p>
<input type="checkbox" name="cots" value="cots">Custom-off-the-Shelf<br>
</p>
<p>
<input type="checkbox" name="displays" value="displays">Displays\Operator Interfaces<br>
</p>
<p>
<input type="checkbox" name="cordReels" value="cordreels">Cord Reels<br>
</p>
<p>
<input type="checkbox" name="pdm" value="pdm">Power Distribution Modules<br>
</p>
<p>
<input type="checkbox" name="rtc" value="rtc">Real Time Clock<br>
</p>
</fieldset>
<fieldset class="step">
<legend>Services I'm interested in...</legend>
<p>
<input type="checkbox" name="productDev" value="productdev">Product Development<br>
</p>
<p>
<input type="checkbox" name="desEng" value="deseng">Design Engineering<br>
</p>
<p>
<input type="checkbox" name="dfx" value="dfx">DFX<br>
</p>
<p>
<input type="checkbox" name="transServices" value="transServices">Transition Services<br>
</p>
<p>
<input type="checkbox" name="stratSourcing" value="stratSourcing">Strategic Sourcing<br>
</p>
<p>
<input type="checkbox" name="planning" value="planning">Planning<br>
</p>
<p>
<input type="checkbox" name="manufacturing" value="manufacturing">Manufacturing<br>
</p>
<p>
<input type="checkbox" name="fullfillment" value="fullfillment">Fullfillment<br>
</p>
<p>
<input type="checkbox" name="prodLifecycle" value="prodLifecycle">Product Life-Cycle Management<br>
</p>
</fieldset>
<fieldset class="step">
<legend>Confirm</legend>
<p>Everything in the form was correctly filled
if all the steps have a green checkmark icon.
A red checkmark icon indicates that some field
is missing or filled out with invalid data.
</p>
<p class="submit">
<button id="registerButton" type="submit">Register</button>
</p>
</fieldset>
</form>
的服务器端代码将PHP。
Plz响应。
你有尝试过吗?您是否使用任何种类的服务器端语言,如PHP或ASP? –
这很大程度上取决于他们如何到达相关页面,以及您是否具有服务器端脚本功能。您可能会考虑PHP中的$ _SERVER ['HTTP_REFERER']',但这不能被依赖。或者,您可以将会话变量设置为查看的最后一个项目。 – BenM
_“是否可以根据他们来自哪个页面来预先检查复选框?”_是。你有什么尝试?如果有什么您需要提供更多的细节和代码。 – j08691