【发布时间】:2012-07-30 13:39:35
【问题描述】:
我正在尝试在 Gravity Forms 中创建一个包含下拉菜单的表单。下拉列表在标签中包含站点上的页面名称,然后在值中包含相应的页面地址值。我正在尝试将用户发送到他们选择的页面。这将如何实现?
【问题讨论】:
我正在尝试在 Gravity Forms 中创建一个包含下拉菜单的表单。下拉列表在标签中包含站点上的页面名称,然后在值中包含相应的页面地址值。我正在尝试将用户发送到他们选择的页面。这将如何实现?
【问题讨论】:
实际上,在这里使用钩子: http://www.gravityhelp.com/documentation/page/Gform_confirmation
您可以获取下拉列表的值,然后在他们提交表单后根据他们的选择进行重定向。
【讨论】:
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 版本等问题。
【讨论】: