وردپرس

Getting default values through the shortcode


I have a complex contact form that I want to apply on multiple pages, but with info that is specific for this page already filled out. So on a page about Spain, I want the field ‘Country of interest’ already to be filled out with ‘Spain’.

I read this article: https://contactform7.com/getting-default-values-from-the-context/, but that does not work for me, adding /?country=Spain to every relevant page gives complications elsewhere.

What I’m looking for is an option to add things in the shortcode, like:
[contact-form-7 id=”1001″ title=”Contactform” Country=”Spain”]

I’m also open to use a script in my form to get a value somewhere out of my page, perhaps a css class for the form or something else. It can’t be the page title or url, since I’m using multiple languages.

I would greatly appreciate it if somebody has a solution!

این خبر را در ایران وب سازان مرجع وب و فناوری دنبال کنید

مشاهده پاسخ های این مطلب
———————————————
این مطلب از سایت انجمن وردپرس گردآوری شده است و کلیه حقوق مطلق به انجمن وردپرس می باشد در صورت مغایرت و یا بروز مشکل اطلاع دهید تا حذف گردد

منبع: انجمن وردپرس

دکمه بازگشت به بالا