This topic has 9 replies, 3 voices, and was last updated 9 years by Nick Plutte.

  • Author
  • #38538
     kristapsw
    Participant

    How can I edit text in this form? And where to find css file?

    #38552
     Radu
    Moderator

    Hello,

    You cand change this text from Theme Options Panel -> Layout Settings -> scroll down at this field “Contact form text”.

    For custom css you can add your code from Theme Options -> General settings -> Quick css, or you can use kelo-child for your customization.

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
    #38581
     kristapsw
    Participant

    But, when can I change the text like “Your Name” etc.?

    #38582
     kristapsw
    Participant

    Sorry… Where

    #38620
     Radu
    Moderator

    For this you need to edit wp-content\themes\kleo\lib\theme-functions.php ,
    search for function kleo_contact_form , inside this function you need to replace “Your Name”,”Your Email” and “Type your message…” with your prefered text. see screenshot below.

    NOTE : Is not recommended to modify core theme files.

    Recommended solution :

    You need to install kleo-child theme, and insert in kleo-child functions.php this code after set your preferred text.

    COPY CODE
    
    
    if (!function_exists('kleo_contact_form')) {
    	function kleo_contact_form( $atts, $content = null ) {
    		extract(shortcode_atts(array(
    			'title'    	 => 'CONTACT US'
    		), $atts));
    	
    		$output = '';
    		
    		$output .= '<div class="kleo-quick-contact-wrapper">'
    			.'<a href="#"><i class="icon-mail-alt"></i></a>'
    			.'<div id="kleo-quick-contact">'
    				.'<h4 class="kleo-qc-title">'. $title .'</h4>'
    				.'<p>'. do_shortcode($content).'</p>'
    				.'<form class="kleo-contact-form" action="#" method="post" novalidate>'
    					.'<input type="text" placeholder="'.__("Your Name",'kleo_framework').'" required id="contact_name" name="contact_name" class="form-control" value="" tabindex="276" />'
    					.'<input type="email" required placeholder="' . __("Your Email",'kleo_framework') . '" id="contact_email" name="contact_email" class="form-control" value="" tabindex="277"  />'
    					.'<textarea placeholder="' . __("Type your message...",'kleo_framework') . '" required id="contact_content" name="contact_content" class="form-control" tabindex="278"></textarea>'
    						.'<input type="hidden" name="action" value="kleo_sendmail">'
    						.'<button tabindex="279" class="btn btn-default pull-right" type="submit">'. __("Send",'kleo_framework').'</button>'
    					.'<div class="kleo-contact-loading">'. __("Sending",'kleo_framework').' <i class="icon-spinner icon-spin icon-large"></i></div>'
    					.'<div class="kleo-contact-success"> </div>'
    				.'</form>'
    				.'<div class="bottom-arrow"></div>'
    			.'</div>'
    		.'</div><!--end kleo-quick-contact-wrapper-->';
    			
    		return $output;
    	}
    	add_shortcode('kleo_contact_form', 'kleo_contact_form');
    }
    
    
    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
    #51562
     Nick Plutte
    Participant

    Hi,

    I have the same issue as kristapsw and would like to use the recommend second way.

    Can I just copy the parent functions.php and paste it to my child theme? I have in mind that the functions.php is a bit tricky compared to other php or css files.

    Cheers Nick

    #51651
     Radu
    Moderator

    Hello Nick Plutte,

    Paste only the code from above to your kleo-child/functions.php

    That’s all

    Cheers

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
    #51662
     Nick Plutte
    Participant

    Hi Radu,

    thanks for your quick reply. I added the following code to my child theme’s functions.php, but it does not work. I also added two Screenshots to illustrate the changes. After editing of the file the letter symbol is not clickable any more.

    Here is my custom code:

    COPY CODE
    /* Change Placeholder in Kleo Quick Contact Form */
    if (!function_exists('kleo_contact_form')) {
    	function kleo_contact_form( $atts, $content = null ) {
    		extract(shortcode_atts(array(
    			'title'    	 => 'CONTACT US'
    		), $atts));
    	
    		$output = '';
    		
    		$output .= '<div class="kleo-quick-contact-wrapper">'
    			.'<a href="#" rel="nofollow"><i class="icon-mail-alt"></i></a>'
    			.'<div id="kleo-quick-contact">'
    				.'<h4 class="kleo-qc-title">'. $title .'</h4>'
    				.'<p>'. do_shortcode($content).'</p>'
    				.'<form class="kleo-contact-form" action="#" method="post" novalidate>'
    					.'<input type="text" placeholder="'.__("Dein Name",'kleo_framework').'" required id="contact_name" name="contact_name" class="form-control" value="" tabindex="276" />'
    					.'<input type="email" required placeholder="' . __("Deine Email",'kleo_framework') . '" id="contact_email" name="contact_email" class="form-control" value="" tabindex="277"  />'
    					.'<textarea placeholder="' . __("Nachricht an uns...",'kleo_framework') . '" required id="contact_content" name="contact_content" class="form-control" tabindex="278"></textarea>'
    						.'<input type="hidden" name="action" value="kleo_sendmail">'
    						.'<button tabindex="279" class="btn btn-default pull-right" type="submit">'. __("Senden",'kleo_framework').'</button>'
    					.'<div class="kleo-contact-loading">'. __("Sending",'kleo_framework').' <i class="icon-spinner icon-spin icon-large"></i></div>'
    					.'<div class="kleo-contact-success"> </div>'
    				.'</form>'
    				.'<div class="bottom-arrow"></div>'
    			.'</div>'
    		.'</div><!--end kleo-quick-contact-wrapper-->';
    			
    		return $output;
    	}
    	add_shortcode('kleo_contact_form', 'kleo_contact_form');
    }
    Attachments:
    You must be logged in to view attached files.
    #51822
     Radu
    Moderator

    Hello,

    Here is a working code

    COPY CODE
    
    
    if (!function_exists('kleo_contact_form')) {
    	function kleo_contact_form( $atts, $content = null ) {
    		extract(shortcode_atts(array(
    			'title'    	 => 'CONTACT US'
    		), $atts));
    	
    		$output = '';
    		
    		$output .= '<div class="kleo-quick-contact-wrapper">'
    			.'<a class="kleo-quick-contact-link" href="#"><i class="icon-mail-alt"></i></a>'
    			.'<div id="kleo-quick-contact">'
    				.'<h4 class="kleo-qc-title">'. $title .'</h4>'
    				.'<p>'. do_shortcode($content).'</p>'
    				.'<form class="kleo-contact-form" action="#" method="post" novalidate>'
    					.'<input type="text" placeholder="'.__("Your Name",'kleo_framework').'" required id="contact_name" name="contact_name" class="form-control" value="" tabindex="276" />'
    					.'<input type="email" required placeholder="' . __("Your Email",'kleo_framework') . '" id="contact_email" name="contact_email" class="form-control" value="" tabindex="277"  />'
    					.'<textarea placeholder="' . __("Nachricht an uns...",'kleo_framework') . '" required id="contact_content" name="contact_content" class="form-control" tabindex="278"></textarea>'
    						.'<input type="hidden" name="action" value="kleo_sendmail">'
    						.'<button tabindex="279" class="btn btn-default pull-right" type="submit">'. __("Send",'kleo_framework').'</button>'
    					.'<div class="kleo-contact-loading">'. __("Sending",'kleo_framework').' <i class="icon-spinner icon-spin icon-large"></i></div>'
    					.'<div class="kleo-contact-success"> </div>'
    				.'</form>'
    				.'<div class="bottom-arrow"></div>'
    			.'</div>'
    		.'</div><!--end kleo-quick-contact-wrapper-->';
    			
    		return $output;
    	}
    	add_shortcode('kleo_contact_form', 'kleo_contact_form');
    }
    
    

    RECOMMENDED SOLUTION : You can translate that strings from Codestyling Localization.

    Cheers

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
    #51842
     Nick Plutte
    Participant

    Hi Radu,

    thank you for the new snippet, works beautifully now.

    Cheers Nick

Viewing 10 posts - 1 through 10 (of 10 total)

The forum ‘KLEO’ is closed to new topics and replies.

Log in with your credentials

Forgot your details?