Forum Replies Created

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter Jens D

    (@jens-d)

    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)

    I have also tried to get a placeholder in both fields, but I’m struggeling…

    I have used the

    At the end, just after class=”mc_input” add this:

    placeholder=”Your best email….”

    trick but that displayed “Din email… (Your email…) in both name and email field. I then used the

    default merge values

    trick by mc nate, but I can only do it in the name field, and the text is a different color (solid black) and you have to manually remove all the text before typing your name.

    Is there a way to use the first approach, but have different text in the two fields?

    Right now my mailchimp_widgte.php looks like this:

    break;
    			case 'email':
    			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="Din email...." />';
    				break;

    And another question: How do I remove ” *=required field” ?

    Best
    Jens

    https://www.marleneasmund.dk

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