Support » Plugin: MailChimp List Subscribe Form » Placeholders – different text in different fields

  • Resolved Jens D

    (@jens-d)


    Hi

    I am struggling with placeholders on my site (marleneasmund.dk). I have used the “hack” to get a placeholder text (your email…), but it displays both in the “email” field and the “name” field. I’m not very strong with coding, so can anybody tell me how to get “Your Email…” in the email field and “Your Name…” in the name field?

    Best regards
    Jens Davidsen

    http://wordpress.org/extend/plugins/mailchimp/

Viewing 2 replies - 1 through 2 (of 2 total)
  • He he… I solved it with some help from another thread (the post by HWI).

    I used this code in mailchimp.widget.php :

    break;
    
    case 'url':
    			case 'imageurl':
    			case 'text':
    			case 'number':
    			default:
    				$html .= '
    	<input type="text" size="18" value="'.esc_html($var['default']).'" name="'.esc_attr($opt).'" id="'.esc_attr($opt).'" class="mc_input" placeholder="Dit navn..."/>';
    	break;
    			case 'email':
    	$html .= '
    	<input type="text" size="18" value="'.esc_html($var['default']).'" name="'.esc_attr($opt).'" id="'.esc_attr($opt).'" class="mc_input" placeholder="Din email…"/>';
    				break;
    
    		}
    		if (!empty($var['helptext'])) {
    			$html .= '<span class="mc_help">'.esc_html($var['helptext']).'</span>';
    		}

    and it worked! “Din email…” is “your email” and “Dit navn…” is “your name” (in danish)

    Plugin Author mc_nate

    (@mc_nate)

    That’s awesome, Jens!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Placeholders – different text in different fields’ is closed to new replies.