使用 jQuery formwizard 重新加入分支?

发布于 2024-10-11 01:28:08 字数 195 浏览 2 评论 0原文

jQuery formwizard (http://thecodemine.org/) 允许您根据输入对表单向导进行分支。我试图弄清楚是否可以重新加入分支(而不仅仅是最后一步。)

例如,根据步骤 1 的输入,我想向用户展示不同的步骤 2。但是,在步骤之后2、其余步骤(步骤3、4、5等)应该都是相同的。

这怎么能做到呢?

谢谢!

jQuery formwizard (http://thecodemine.org/) allows you to branch a form wizard based on inputs. I am trying to figure out if it possible to rejoin the branches (and not just for the last step.)

e.g. Based on the inputs to Step 1, I'd like to present the user with a different step 2. However, after step 2, the remaining steps (step 3, 4, 5, etc.) should all be the same.

How can this be done?

Thanks!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

别靠近我心 2024-10-18 01:28:08

这只需使用“第二”步骤之一的链接即可。这是通过使用 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>

希望这有帮助

this would just be a matter of using a link for one of the "second" steps. This is done by specifying a hidden input field with a class="link" and have the value set to the id of the step that should follow next. Like this (see "second step"):

<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>

Hope this helps

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文