by ClaDax
6 replies
Hello,

I know a bit about programming, but this code made me troubles. I know the solution is easy!

I tried several ways but I can't bring it to work... Maybe somebody can help me to implement my auto responder into my website.

That would be great! That is the standard code of my website:

Code:
<div class="optBox">
        <h3>Enter Your Info Below To Register</h3>
        <form method="post" class="" action="">
        <label class="previewLabel" for="awf_field"></label>
        <input type="text" class="text" id="awf_field" name="email" value="First Name..." tabindex="500" onfocus=" if (this.value == 'First Name...') { this.value = ''; }" onblur="if (this.value == '') { this.value='First Name...';} ">
        <input type="text" class="text" id="awf_field" name="email" value="Your email address..." tabindex="501" onfocus=" if (this.value == 'Your email address...') { this.value = ''; }" onblur="if (this.value == '') { this.value='Your email address...';} ">
        <input type="submit" name="submit" class="submit btn" value="Register Now" tabindex="502">
        </form>
        </div>
In this Opt-In Box above I would like to implement the data from the code below, so that I get just the name and the email-address from the subscriber. "MYSUB_CODE" will be replaced by the subscription code from MailChimp.

Code:
<div id="mc_embed_signup">
<form action="MYSUB_CODE" method="post" id="mc-embedded-subscribe-form" name="mc-embedded-subscribe-form" class="validate" target="_blank">
	
<div class="mc-field-group">
	<label for="mce-NAME">Name </label>
	<input type="text" value="" name="NAME" class="" id="mce-NAME">
</div>
<div class="mc-field-group">
	<label for="mce-WSITE">Website </label>
	<input type="text" value="" name="WSITE" class="" id="mce-WSITE">
</div>
<div class="mc-field-group">
	<label for="mce-EMAIL">Email Address </label>
	<input type="email" value="" name="EMAIL" class="required email" id="mce-EMAIL">
</div>
	<div id="mce-responses" class="clear">
		<div class="response" id="mce-error-response" style="display:none"></div>
		<div class="response" id="mce-success-response" style="display:none"></div>
	</div>	<div class="clear"><input type="submit" value="Subscribe" name="subscribe" id="mc-embedded-subscribe" class="button"></div>
</form>
</div>
Big thanks to everyone who takes a bit of time for me! Thank you!
#autoresponder #email #php #programming help #subscription
  • {{ DiscussionBoard.errors[5842828].message }}
    • Profile picture of the author Brandon Tanner
      I don't know what kind of external CSS styling you have for your "optBox" class (if any), so you might have to play around with that a bit to get all of the elements properly aligned. But the code below should work...

      HTML Code:
      <div class="optBox">
      
              <h3>Enter Your Info Below To Register</h3>
      
              <form action="MYSUB_CODE" method="post" id="mc-embedded-subscribe-form" name="mc-embedded-subscribe-form" class="validate" target="_blank">
      
              <label class="previewLabel" for="awf_field"></label>
      
              <input type="text" class="text"  name="NAME" id="mce-NAME" value="First Name..." tabindex="500" onfocus=" if (this.value == 'First Name...') { this.value = ''; }" onblur="if (this.value == '') { this.value='First Name...';} ">
      
              <input type="text" class="text" name="EMAIL" id="mce-EMAIL"  value="Your email address..." tabindex="501" onfocus=" if (this.value == 'Your email address...') { this.value = ''; }" onblur="if (this.value == '') { this.value='Your email address...';} ">
      
              <input type="submit" name="submit" class="submit btn" value="Register Now" tabindex="502">
      
              </form>
      
       </div>
      Signature

      {{ DiscussionBoard.errors[5846978].message }}
  • Profile picture of the author ClaDax
    Brandon Tanner...

    Thanks for helping me out.

    I tried it with the current CSS styling and it is working smoothly!

    ...your are the man!
    {{ DiscussionBoard.errors[5848486].message }}
  • Profile picture of the author ClaDax
    I have the same problem again. Those forms are horrible. I know its easy, but I just can't see the where to put which code part. Would be awesome if someone could fix that really quick.

    That is the standard code of my website:

    Code:
    <!-- form -->
    
    			 <form id="signupform" action="" method="post">
                 <img src="images/arrow_down.png" alt="" class="arrow_down" /><h4>Subscribe and get our free Webdesign design advice PDF book</h4>
                 <div class="clear"></div>
    					<div class="form_input_first">
    						<label>First Name</label><input type="text" name="first-name" id="name" maxlength="35" value="Please enter your first name!" onblur="if(this.value==''){this.value='Please enter your first name!'}" onfocus="if(this.value=='Please enter your first name!'){this.value=''}" />
    					</div>
    					<div class="form_input">
    						<label>Phone Number</label><input type="text" name="phone-number" id="phone-number" maxlength="35" value="Please enter your phone number!" onblur="if(this.value==''){this.value='Please enter your phone number!'}" onfocus="if(this.value=='Please enter your phone number!'){this.value=''}" />
    					</div>
    					<div class="form_input">
    						<label>Email</label><input type="text" name="email" id="email" maxlength="35" value="Please enter your email!" onblur="if(this.value==''){this.value='Please enter your email!'}" onfocus="if(this.value=='Please enter your email!'){this.value=''}" />
    					</div>
    					<div class="form_input_last">
                             <br/>
                              
    						<button type="submit" name="submit" id="submit">Subscribe</button>
    					</div>
    				</form>
                    <!--/form -->
    and:

    Code:
    <!-- start of newsletter -->
    		<div id="newsletter">
    			<h4>Sign up to our Newsletter</h4>
    			<p>Get site updates, hot products, freebies and web app news</p>
    			<form action="" method="post">
    				<div>
    					<input type="text" name="email" />
    					<button type="submit" title="Join our newsletter" class="submit" name="submit">Sign Up</button>
    				</div>
    			</form>
    		</div>
    		<!-- end of newsletter -->
    In those Opt-In Boxes above I would like to implement the data from the code below, so that I get just the name and the email-address from the subscriber. "MYSUB_CODE" will be replaced by the subscription code from MailChimp.

    Code:
    <!-- Begin MailChimp Signup Form -->
    <link href="http://cdn-images.mailchimp.com/embedcode/classic-081711.css" rel="stylesheet" type="text/css">
    <style type="text/css">
    	#mc_embed_signup{background:#fff; clear:left; font:14px Helvetica,Arial,sans-serif;  width:250px;}
    	/* Add your own MailChimp form style overrides in your site stylesheet or in this style block.
    	   We recommend moving this block and the preceding CSS link to the HEAD of your HTML file. */
    </style>
    <div id="mc_embed_signup">
    <form action="MYSUB_CODE" method="post" id="mc-embedded-subscribe-form" name="mc-embedded-subscribe-form" class="validate" target="_blank">
    	<h2>Subscribe to our mailing list</h2>
    <div class="indicates-required"><span class="asterisk">*</span> indicates required</div>
    <div class="mc-field-group">
    	<label for="mce-FNAME">First Name </label>
    	<input type="text" value="" name="FNAME" class="" id="mce-FNAME">
    </div>
    <div class="mc-field-group size1of2">
    	<label for="mce-PHONENR">Phone Number </label>
    	<input type="number" name="PHONENR" class="" value="" id="mce-PHONENR">
    </div>
    <div class="mc-field-group">
    	<label for="mce-EMAIL">Email Address  <span class="asterisk">*</span>
    </label>
    	<input type="email" value="" name="EMAIL" class="required email" id="mce-EMAIL">
    </div>
    	<div id="mce-responses" class="clear">
    		<div class="response" id="mce-error-response" style="display:none"></div>
    		<div class="response" id="mce-success-response" style="display:none"></div>
    	</div>	<div class="clear"><input type="submit" value="Subscribe" name="subscribe" id="mc-embedded-subscribe" class="button"></div>
    </form>
    </div>
    
    <!--End mc_embed_signup-->
    Huge thanks to everyone who takes a bit of time for me! Thank you!
    {{ DiscussionBoard.errors[5937924].message }}
    • Profile picture of the author ClaDax
      So I tried on my own - Maybe somebody could overfly it and check if the code will work?

      CODE 1:

      Code:
      <!-- form -->
      
      			 <form id="signupform" action="MYSUB_CODE" method="post">
                   <img src="images/arrow_down.png" alt="" class="arrow_down" /><h4>Subscribe and get our free Webdesign design advice PDF book</h4>
                   <div class="clear"></div>
      					<div class="form_input_first">
      						<label>First Name</label><input type="text" name="FNAME" id="mce-FNAME" maxlength="35" value="Please enter your first name!" onblur="if(this.value==''){this.value='Please enter your first name!'}" onfocus="if(this.value=='Please enter your first name!'){this.value=''}" />
      					</div>
      					<div class="form_input">
      						<label>Phone Number</label><input type="text" name="PHONENR" id="mce-PHONENR" maxlength="35" value="Please enter your phone number!" onblur="if(this.value==''){this.value='Please enter your phone number!'}" onfocus="if(this.value=='Please enter your phone number!'){this.value=''}" />
      					</div>
      					<div class="form_input">
      						<label>Email</label><input type="text" name="EMAIL" id="mce-EMAIL" maxlength="35" value="Please enter your email!" onblur="if(this.value==''){this.value='Please enter your email!'}" onfocus="if(this.value=='Please enter your email!'){this.value=''}" />
      					</div>
      					<div class="form_input_last">
                               <br/>
                                
      						<button type="submit" name="subscribe" id="mc-embedded-subscribe">Subscribe</button>
      					</div>
      				</form>
                      <!--/form -->

      CODE 2:

      Code:
      <!-- start of newsletter -->
      		<div id="newsletter">
      			<h4>Sign up to our Newsletter</h4>
      			<p>Get site updates, hot products, freebies and web app news</p>
      			<form action="MYSUB_CODE" method="post">
      				<div>
      					<input type="text" name="EMAIL" id="mce-EMAIL" />
      					<button type="submit" title="Join our newsletter" class="submit" name="subscribe" id="mc-embedded-subscribe">Sign Up</button>
      				</div>
      			</form>
      		</div>
      		<!-- end of newsletter -->
      Big thanks to everyone who takes a second to overfly it!
      {{ DiscussionBoard.errors[5943164].message }}
  • {{ DiscussionBoard.errors[5947685].message }}

Trending Topics