Forum Replies Created
-
Thanks, got it working! 🙂
in reply to: Update options of form element using SQLThanks for making that clear!
in reply to: Hide form on submit…Thanks Richard.
I solved the problem, just for the record the “how”:
Create a script file inside the theme-folder (e.g. “/scripts/hideform.js”):
jQuery(document).ready(function () { jQuery('body').bind('dhvc_form_after_submit', function (event, form) { jQuery('.dhvcform').hide(); }); });
Then enqueue the script using the theme’s functions.php like that:
wp_enqueue_script('hideform', get_template_directory_uri() . '/scripts/hideform.js', array('jquery') );
This section has to be run at the “wp_enqueue_scripts” action, so you have to create some envelope around the code like that:
function add_my_scripts() { wp_enqueue_script('hideform', get_template_directory_uri() . '/scripts/hideform.js', array('jquery') ); } add_action('wp_enqueue_scripts', 'add_my_scripts');
in reply to: Hide form on submit…Maybe “$language = apply_filters(‘dhvc_form_language_code’,$language);” overwrites the language-setting a few lines above:
<?php $output = $css_class =''; extract(shortcode_atts(array( 'captcha_type'=>'2', 'type'=>'recaptcha', 'theme'=>'red', 'language'=>'de', 'control_label'=>'', 'control_name'=>'', 'placeholder'=>'', 'help_text'=>'', 'required'=>'1', 'attributes'=>'', 'el_class'=> '', ), $atts)); $name = esc_attr($control_name); global $dhvc_form; $name = $name.'_'.$dhvc_form->ID; $label = esc_html($control_label); $language = apply_filters('dhvc_form_language_code',$language); if($captcha_type == '2'){ [...]
in reply to: reCaptcha 2Thanks Richard, I’m with you – this should be a default feature.
Now I’m going to have a look where to put the js into my custom theme.
in reply to: Hide form on submit…Are you sure about “vc_templates”? I just did that and it is not working.
in reply to: reCaptcha 2I cannot get this to work. Where should I put the Javascript? Into “Additional Settings” or into the header/footer of my page? FYI I had to use jQuery instead of $, but this is usually the case with my setup.
in reply to: Hide form on submit…