【问题标题】:How to redirect to another page with Gravity forms drop down value?如何使用重力表单下拉值重定向到另一个页面?
【发布时间】:2012-07-30 13:39:35
【问题描述】:

我正在尝试在 Gravity Forms 中创建一个包含下拉菜单的表单。下拉列表在标签中包含站点上的页面名称,然后在值中包含相应的页面地址值。我正在尝试将用户发送到他们选择的页面。这将如何实现?

【问题讨论】:

    标签: forms wordpress gravity


    【解决方案1】:

    实际上,在这里使用钩子: http://www.gravityhelp.com/documentation/page/Gform_confirmation

    您可以获取下拉列表的值,然后在他们提交表单后根据他们的选择进行重定向。

    【讨论】:

      【解决方案2】:

      Javascript。

        // get your select element and listen for a change event on it
        $('#the_drop_down').change(function() {
           // set the window's location property to the value of the option the user has selected
           window.location = $(this).val();
        });
      

      通过:Redirect automatically when selecting an item from a select drop-down list

      那篇文章涵盖了 IE 兼容性 和使用 jQuery 版本等问题。

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 2016-02-28
        • 2015-11-10
        • 1970-01-01
        • 2015-03-12
        • 2011-02-22
        • 2011-06-19
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多