Go Back   CodingForums.com > :: Client side development > HTML & CSS

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 10-19-2012, 12:42 AM   PM User | #1
avaxcontrol
New to the CF scene

 
Join Date: Oct 2012
Posts: 7
Thanks: 4
Thanked 0 Times in 0 Posts
avaxcontrol is an unknown quantity at this point
Assistance with <input="submit"> form function?

Hello,

I just purchased a landing page template from Theme Forest called "Lista". It has a built in newsletter registration form. I'm not very experienced with web design so my question is probably ridiculously easy, but... The code for the submit button is <input="submit">, which I understand is standard, but where does it submit TO? How do I define that? I need the signup forms to go to two specific Email addresses and I'm not sure how to tell it to do that.

Please help! The landing page isn't really of much use to me unless I can figure out how to get the signups sent to the right place!

Thanks in advance.

A
avaxcontrol is offline   Reply With Quote
Old 10-19-2012, 12:49 AM   PM User | #2
tracknut
Regular Coder

 
Join Date: Aug 2006
Posts: 891
Thanks: 4
Thanked 205 Times in 204 Posts
tracknut is an unknown quantity at this point
That <input> should be contained within a <form>, and the <form> should have a "action=blah" attribute, where "blah" is the name of a server-side script to run when someone presses the submit button. That server-side script could do a lot of things, but in your case it would be the script that collects the fields and sends the two emails.

Whether that script exists with your canned template, or they expect you to write it, I don't know.

Dave
tracknut is offline   Reply With Quote
Users who have thanked tracknut for this post:
avaxcontrol (10-19-2012)
Old 10-19-2012, 01:45 AM   PM User | #3
avaxcontrol
New to the CF scene

 
Join Date: Oct 2012
Posts: 7
Thanks: 4
Thanked 0 Times in 0 Posts
avaxcontrol is an unknown quantity at this point
Dave, thanks so much for your response. This is the code from the Newsletter section... I don't see an "action" attribute but I'm also not exactly sure what I should be looking for...

<!-- Start Form -->
<div class="searchDiv">
<input type="text" class="inputbg" onfocus="if (this.value == 'Your Name') {this.value = '';}" onblur="if (this.value == '') {this.value = 'Your Name';}" value="Your Name" />
<input type="text" class="inputbg" onfocus="if (this.value == 'Your Email') {this.value = '';}" onblur="if (this.value == '') {this.value = 'Your Email';}" value="Your Email" />
<input type="submit" class="submit" value="Download now!" />
</div><!-- Form END -->

<div class="clear"></div><!-- CLEAR -->

<div class="notice">
<img class='alignleft' src='images/contact.png' alt=''/>
<p>* We will not forward your email address to any third party.</p>
</div>

</div><!-- Newsletter Box END -->

</div><!-- Background Image END-->

</div><!-- Newsletter Signup END -->
avaxcontrol is offline   Reply With Quote
Old 10-19-2012, 01:47 AM   PM User | #4
avaxcontrol
New to the CF scene

 
Join Date: Oct 2012
Posts: 7
Thanks: 4
Thanked 0 Times in 0 Posts
avaxcontrol is an unknown quantity at this point
Actually there's a few things before the form, too, maybe something useful?

<!-- Start Newsletter Signup -->
<div class="grid_4">

<!-- Start Background Image -->
<div class="signup">

<!-- Start Newsletter Box -->
<div class="newsletter">

<h2>Subscribe to our List<br /> and get your download.</h2>

<p>Subscribe to our newsletter now and get exclusive deals you wont find anywhere else straight to your inbox! Sign in and get your free product download instantly after you has confirmed your Email.</p>

<!-- Start Form -->
<div class="searchDiv">
<input type="text" class="inputbg" onfocus="if (this.value == 'Your Name') {this.value = '';}" onblur="if (this.value == '') {this.value = 'Your Name';}" value="Your Name" />
<input type="text" class="inputbg" onfocus="if (this.value == 'Your Email') {this.value = '';}" onblur="if (this.value == '') {this.value = 'Your Email';}" value="Your Email" />
<input type="submit" class="submit" value="Download now!" />
</div><!-- Form END -->

<div class="clear"></div><!-- CLEAR -->

<div class="notice">
<img class='alignleft' src='images/contact.png' alt=''/>
<p>* We will not forward your email address to any third party.</p>
</div>

</div><!-- Newsletter Box END -->

</div><!-- Background Image END-->

</div><!-- Newsletter Signup END -->
avaxcontrol is offline   Reply With Quote
Old 10-19-2012, 02:18 AM   PM User | #5
tracknut
Regular Coder

 
Join Date: Aug 2006
Posts: 891
Thanks: 4
Thanked 205 Times in 204 Posts
tracknut is an unknown quantity at this point
Can you post a link to the page? As far as I know, an <input> needs to be inside a <form>, so I suspect it is in code you're not showing here.

Dave
tracknut is offline   Reply With Quote
Users who have thanked tracknut for this post:
avaxcontrol (10-19-2012)
Old 10-19-2012, 02:20 AM   PM User | #6
avaxcontrol
New to the CF scene

 
Join Date: Oct 2012
Posts: 7
Thanks: 4
Thanked 0 Times in 0 Posts
avaxcontrol is an unknown quantity at this point
You can find it at:

http://yourlovemyaddiction.com/landing/lista/html/

That's just a random dead site I was hosting for a friend so that's where I'm testing the code. The actual page will be branded for a heating and air company I'm doing some marketing work for. I don't want it on their server until it works!

Thanks again for taking the time to check this out!

A
avaxcontrol is offline   Reply With Quote
Old 10-19-2012, 02:30 AM   PM User | #7
tracknut
Regular Coder

 
Join Date: Aug 2006
Posts: 891
Thanks: 4
Thanked 205 Times in 204 Posts
tracknut is an unknown quantity at this point
Well I'm a bit stumped. I can't see a <form> either, and as far as I can see, that "subscribe here" form is purely a visual example of a form, I don't see how it would actually process anything.

Perhaps I'm missing something completely, let's see if anyone else chimes in.

Dave
tracknut is offline   Reply With Quote
Users who have thanked tracknut for this post:
avaxcontrol (10-19-2012)
Old 10-19-2012, 02:33 AM   PM User | #8
avaxcontrol
New to the CF scene

 
Join Date: Oct 2012
Posts: 7
Thanks: 4
Thanked 0 Times in 0 Posts
avaxcontrol is an unknown quantity at this point
If it is just a visual example, what would I need to make it functional? I'm fairly decent with cobbling things together in HTML or php but like you this stumped me! Maybe I could build a different kind of form and take the input action from the source code of that and apply it to that form? I know there are sites that will let me build sign up forms and give me the code, but I don't know if that would need to be integrated with the other code in the template or what...

A
avaxcontrol is offline   Reply With Quote
Old 10-19-2012, 02:45 AM   PM User | #9
tracknut
Regular Coder

 
Join Date: Aug 2006
Posts: 891
Thanks: 4
Thanked 205 Times in 204 Posts
tracknut is an unknown quantity at this point
Totally quick n dirty, probably won't work, but your html should look something like:
Code:
<form action="mailer.php" method="post">
	<input type="text" name="name">
        <input type="text" name="email">
        <input type="submit" class="submit"  value="Send" />
</form>
That will submit 3 fields in a $_POST array, to a script called mailer.php, which looks like:

PHP Code:
  $email $_POST['email'] ;
  
$name $_POST['name'];
  
$subject "this is the subject";
  
$message "this is the body of the email sent from $name";
  
mail("avax@avax.com"$subject$message"From:" $email); 
Dave
tracknut is offline   Reply With Quote
Users who have thanked tracknut for this post:
avaxcontrol (10-19-2012)
Old 10-19-2012, 02:47 AM   PM User | #10
avaxcontrol
New to the CF scene

 
Join Date: Oct 2012
Posts: 7
Thanks: 4
Thanked 0 Times in 0 Posts
avaxcontrol is an unknown quantity at this point
That is so awesome, thank you! I'll test it out, and even if it doesn't work exactly the way it's written you've given me a great starting point!

A
avaxcontrol is offline   Reply With Quote
Old 10-19-2012, 04:20 AM   PM User | #11
avaxcontrol
New to the CF scene

 
Join Date: Oct 2012
Posts: 7
Thanks: 4
Thanked 0 Times in 0 Posts
avaxcontrol is an unknown quantity at this point
Dave,

Thank you again so much! I was able to use your code and tweak it to do what I needed, and the landing page is now fully functional You can check out the test version here if you care to:

http://www.yourlovemyaddiction.com/l...atandair3.html

Thanks again!

A
avaxcontrol is offline   Reply With Quote
Old 10-19-2012, 04:25 AM   PM User | #12
tracknut
Regular Coder

 
Join Date: Aug 2006
Posts: 891
Thanks: 4
Thanked 205 Times in 204 Posts
tracknut is an unknown quantity at this point
Awesome!

I was reading the logo, I think it should be "...we're more than just hot air"

Dave
tracknut is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 04:25 PM.


Advertisement
Log in to turn off these ads.