jQuery formwizard(http://thecodemine.org/)允许您根据输入分支表单向导。我试图弄清楚是否有可能重新加入分支(而不仅仅是最后一步。)
e.g。基于步骤1的输入,我想向用户呈现不同的步骤2.但是,在步骤2之后,剩余的步骤(步骤3,4,5等)应该都是相同的。
如何做到这一点?
谢谢!
答案 0 :(得分:3)
这只是使用链接进行“第二”步骤之一。这是通过使用class =“link”指定隐藏的输入字段并将值设置为接下来应该遵循的步骤的id来完成的。像这样(见“第二步”):
<div class="step" id="first">
navigates to either second or third step depending on what is selected in the dropdown
<select class="link" name="firstlink" id="firstlink">
<option value=""></option>
<option value="second">go to second</option>
<option value="third">go to third</option>
</select>
</div>
<div class="step" id="second">
uses a link to go to fourth step
<input class="link" value="fourth" />
</div>
<div class="step" id="third">
falls through to fourth steo
<div>
<div class="step" id="fourth">
common step
<div>
希望这有帮助