Title: Dynamic fields and conditional fields problem
Last modified: June 19, 2018

---

# Dynamic fields and conditional fields problem

 *  Resolved [davemktg86](https://wordpress.org/support/users/davemktg86/)
 * (@davemktg86)
 * [7 years, 11 months ago](https://wordpress.org/support/topic/dynamic-fields-and-conditional-fields-problem/)
 * Hi! I have a problem with the visibility of the conditional field following the
   dynamic compilation of the previous field
 * At this page([https://work.cartaedilizia.it/info-e-appuntamenti/](https://work.cartaedilizia.it/info-e-appuntamenti/))
   I setted auto-compilance on first field based on provenience link(for exemple
   from cta on page [https://work.cartaedilizia.it/servizi/sopralluoghi-rilievi-cantiere/](https://work.cartaedilizia.it/servizi/sopralluoghi-rilievi-cantiere/)).
   The second field(on same row) is a conditional field based on first field selection.
   But if the first field is precompilated the conditional one doesn’t appear.
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fdynamic-fields-and-conditional-fields-problem%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 7 replies - 1 through 7 (of 7 total)

 *  Plugin Author [Jules Colle](https://wordpress.org/support/users/jules-colle/)
 * (@jules-colle)
 * [7 years, 11 months ago](https://wordpress.org/support/topic/dynamic-fields-and-conditional-fields-problem/#post-10415324)
 * Hey, you should probably trigger a change event on the control after the form
   is loaded, something like this:
 * `jQuery('[name="menu-servizio"]').change();`
 *  Thread Starter [davemktg86](https://wordpress.org/support/users/davemktg86/)
 * (@davemktg86)
 * [7 years, 11 months ago](https://wordpress.org/support/topic/dynamic-fields-and-conditional-fields-problem/#post-10417725)
 * Thanks!
    but where should I add this code?
 *  Plugin Author [Jules Colle](https://wordpress.org/support/users/jules-colle/)
 * (@jules-colle)
 * [7 years, 11 months ago](https://wordpress.org/support/topic/dynamic-fields-and-conditional-fields-problem/#post-10417882)
 * The moment your form is loaded. The preferred way to add it is something theme
   specific. Best to contact the theme author.
 * An alternative but very dirty solution however, is to trigger the change event
   every 2 seconds like this:
 *     ```
       <script>
       window.setInterval(function(){
         jQuery('[name="menu-servizio"]').change();
       }, 2000);
       </script>
       ```
   
 * You could add this code right before the closing </body> tag in your theme’s 
   footer.php file.
 * Keep in mind that this is an extremely dirty hack, but in case you have absolutely
   no idea about javascript and proper web development, this should do the trick
   for you.
 *  Thread Starter [davemktg86](https://wordpress.org/support/users/davemktg86/)
 * (@davemktg86)
 * [7 years, 11 months ago](https://wordpress.org/support/topic/dynamic-fields-and-conditional-fields-problem/#post-10438996)
 * hi, I’m sorry for the wait.
 * I contacted theme author. They said there is a compatibility issue with select2.
   js library, without this plugin works; they asked me to clarify if this feature
   works with this library… can you help me?
 * thanks
 *  Plugin Author [Jules Colle](https://wordpress.org/support/users/jules-colle/)
 * (@jules-colle)
 * [7 years, 11 months ago](https://wordpress.org/support/topic/dynamic-fields-and-conditional-fields-problem/#post-10439100)
 * the plugin does not include the select2.js library, so I’m afraid I can’t help
   you with this.
 *  Thread Starter [davemktg86](https://wordpress.org/support/users/davemktg86/)
 * (@davemktg86)
 * [7 years, 10 months ago](https://wordpress.org/support/topic/dynamic-fields-and-conditional-fields-problem/#post-10496632)
 * Hi! thanks for your support!
    with this library disabled the plugins work properly!!
   Thanks
 * ps: can I modify my first message to remove my site links?
 *  Plugin Author [Jules Colle](https://wordpress.org/support/users/jules-colle/)
 * (@jules-colle)
 * [7 years, 10 months ago](https://wordpress.org/support/topic/dynamic-fields-and-conditional-fields-problem/#post-10533067)
 * I cannot edit any posts on this support forum. You will need to get in touch 
   with a moderator in order to have your messages deleted. But I know from experience
   this is a pain, so it’s best not share any links you don’t want to be public 
   in the first place. Good luck!

Viewing 7 replies - 1 through 7 (of 7 total)

The topic ‘Dynamic fields and conditional fields problem’ is closed to new replies.

 * ![](https://ps.w.org/cf7-conditional-fields/assets/icon-256x256.png?rev=2072595)
 * [Conditional Fields for Contact Form 7](https://wordpress.org/plugins/cf7-conditional-fields/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/cf7-conditional-fields/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/cf7-conditional-fields/)
 * [Active Topics](https://wordpress.org/support/plugin/cf7-conditional-fields/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/cf7-conditional-fields/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/cf7-conditional-fields/reviews/)

 * 7 replies
 * 2 participants
 * Last reply from: [Jules Colle](https://wordpress.org/support/users/jules-colle/)
 * Last activity: [7 years, 10 months ago](https://wordpress.org/support/topic/dynamic-fields-and-conditional-fields-problem/#post-10533067)
 * Status: resolved