Creating own shortcode – echoeing php variable based on JS variable
You can’t add logic for changing in that way. You need react on user “front-end” event with js. Also this construction will work wrong: document.getElementById(\”form\”).innerHTML = \”[contact-form-7 id=\”formId\”]\”; Will be always print [contact-form-7 id=\”formId\”], because js can’t do_shortcode function itself. If you wanna make it simple(without ajax process) you need: 1) Print all forms with … Read more