在页面中,TRIM 被正确显示...所以对我来说,解决方案是读取数据并将其转换为文本或其他内容...我不知道.有人可以帮忙吗? 解决方案 我找到的答案是在我的联系表格中没有通过我的联系表格发送修剪作为 ID 位于 carquery-api.php 文件中链接的 Javascript 文件中.第 107 行:wp_register_script('carquery-api-js', 'https://www.carqueryapi.com/js/carquery.0.3.4.js', array('jquery'),'0.3.4', 真);我转到那个文件,复制它,然后在第 867 行我将trim_id"更改为model_id"如下图:options += ''+ trim_display + '</option>';现在,当我使用选择器填写表单时,它将使用型号名称而不是型号的 ID 号.抱歉,来晚了.希望这可以帮助任何可能需要它的人!Hello i am new to the community with little knowledge of coding but with huge interest to grow bigger and bigger in the knowledge. Sorry if my English is bad, i am Bulgarian.So, recently i've isntalled CARQuery API for Wordpress. I need a contact form 7 with Year/make/model/trim dropdown fields and submit them to email. Everything is fine except the TRIM field...instead of engine size i get numbers like 74567, 34567 and so on..This is the otput in email:Vehichle InfoYear: 2001Make: opelModel: ZafiraTrim: 30538it should be Vehichle InfoYear: 2001Make: opelModel: ZafiraTrim: 2.0 DieselUntil now i am using shortcodes for the dropdowns:[select* cq-year id:cq-year][select* cq-make id:cq-make][select* cq-model id:cq-model][select* cq-trim id:cq-trim][submit "SEND"]and a function in functions.phpadd_action('init','load_carquery_api_scripts');function load_carquery_api_scripts() { if (class_exists('CarQueryAPI')) { CarQueryAPI::$add_script = true; }}What could be the solutions for trim? Is there a way the get data from dropdown TRIM field and export it as text. Here is the test page:https://car.avtopedia.com/?page_id=7285In the page the TRIM is visualised correctly...so for me the solution is to read the data and convert it to text or something ... i do not know. Could somebody help ? 解决方案 The answer I found for having the trim not be sent through my contact form as an ID was within the Javascript file linked within the carquery-api.php file.On line 107: wp_register_script('carquery-api-js', 'https://www.carqueryapi.com/js/carquery.0.3.4.js', array('jquery'),'0.3.4', true);I went to that file, copied it, and on line 867 I changed the 'trim_id' to 'model_id'Looking like this below: options += '<option value="' + trims[i].model_trim + '" '+s+'>' + trim_display + '</option>';Now when I fill out my form using the selectors, it will use the model name rather than the model's ID number.Sorry this is late. Hope this helps anyone who might need it! 这篇关于用于 Wordpress 的 Contact form 7 中的 CARQuery API.一些自定义代码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 10-23 13:08