• I am working on a revamped website. Using the regular WP editor, the script runs as expected. The script creates a dropdown of the contact form 7 forms to select from.

    When I place the same script into WPBakery Text Box Setting (Text Tab) and then open the page… the selection box appears and I can make my selection. However, my selected form does not appear.

    Any ideas?

Viewing 3 replies - 1 through 3 (of 3 total)
  • However, my selected form does not appear.

    Where can we see this? Please include a link to your form in your original question – so others can examine what is happening.

    Thread Starter brome2day

    (@brome2day)

    Our development is locked down at this time.

    Here’s the code…

    <script type="text/javascript">// <![CDATA[ function SelectRedirect(){ switch(document.getElementById('reason').value) { case "accountmanager": window.location="/contact-account-manager/"; break; case "applications": window.location="/contact-applications/"; break; case "careers": window.location="/contact-careers/"; break; case "infrastructure": window.location="/contact-infrastructure/"; break; case "networksolutions": window.location="/contact-network-solutions/"; break;case "other": window.location="/contact-other/"; break;case "partnering": window.location="/contact-partnering/"; break;case "staffing": window.location="/contact-staffing/"; break;case "suggestion": window.location="/contact-suggestion/"; break;default: window.location="#";break; }} // ]]></script>
    
    Reason for contact: ?<select id="reason" name="reasonforcontact" onchange="SelectRedirect();">
    <option value="">choose reason...</option>
    <option value="accountmanager">Contact an Account Manager</option>
    <option value="applications">Contact Us about Application Development</option>
    <option value="careers">Contact Us about Career Opportunities</option>
    <option value="infrastructure">Contact Us about an Infrastructure Need</option>
    <option value="networksolutions">Contact Our Network Solutions Group</option>
    <option value="partnering">Contact Us about Partnering</option>
    <option value="staffing">Contact Us about a Staffing Need</option>
    <option value="suggestion">Contact Us with a Suggestion</option>
    <option value="other">Contact Us for Another Reason</option>
    </select>
    

    As I mentioned before, the dropdown comes up with the selections, but nothing happens when I click on a dropdown entry. (When I’m using it from WPBakery)

    I don’t think it is theme related because I can make the script work on a regular WP page. It’s when I put the code into WPBakery that it fails to bring up the form after selecting it from the dropbox list.

    Thank you!

    Need link to examine with browser dev tools. Not practical to respond otherwise. Consider setting up a copy of form on hidden page on some site which is accessible only via link from here.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Script issue with WPBakery/Visual Composer’ is closed to new replies.