Sitesao Support
  • Home
  • Themes
  • Plugins
  • Support

Support Forums

Home/Forums/
  • Profile
  • Topics Started
  • Replies Created
  • Favorites

Forum Replies Created

  • 10 years, 2 months ago miwalter
    Participant
    Post count: 8

    Thanks, got it working! 🙂


    in reply to: Update options of form element using SQL
    10 years, 2 months ago miwalter
    Participant
    Post count: 8

    Thanks for making that clear!


    in reply to: Hide form on submit…
    10 years, 2 months ago miwalter
    Participant
    Post count: 8

    Thanks, working!


    in reply to: reCaptcha 2
    10 years, 2 months ago miwalter
    Participant
    Post count: 8

    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…
    10 years, 2 months ago miwalter
    Participant
    Post count: 8

    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 2
    10 years, 2 months ago miwalter
    Participant
    Post count: 8

    Thanks 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…
    10 years, 2 months ago miwalter
    Participant
    Post count: 8

    Are you sure about “vc_templates”? I just did that and it is not working.


    in reply to: reCaptcha 2
    10 years, 2 months ago miwalter
    Participant
    Post count: 8

    I 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…
Viewing 8 posts - 1 through 8 (of 8 total)
© Copyright Sitesao.com - Support Policy