【发布时间】:2020-12-28 14:24:21
【问题描述】:
基于this 威胁,我已经设法(特别感谢 Tami)创建了一个包含可变年份数字的下拉菜单。 现在我想将该下拉菜单的选定值用作另一个输入字段的(部分)占位符。
我试过这个没有运气:
[number* ba-maanden min:1 max:12 placeholder "cf7_get_input="recent-years""]
有人知道如何完成这项工作吗?
谢谢, 瓦斯科
【问题讨论】:
-
你可能想要像这样使用 jQuery 的东西 stackoverflow.com/questions/9232810/…
-
谢谢霍华德,所以如果我是正确的,我可以使用这段代码吗?但不幸的是,它不起作用。
add_action( 'wpcf7_contact_form', 'action_wpcf7_contact_form', 10, 1 ); $('9462').find("input[type=dropdown]").each(function(ev) { if(!$(this).val()) { $(this).attr("placeholder", [recent-years]); };
标签: input drop-down-menu placeholder contact-form-7