Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 12 of 12
  1. #1
    New to the CF scene
    Join Date
    Oct 2012
    Posts
    7
    Thanks
    4
    Thanked 0 Times in 0 Posts

    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

  • #2
    Senior Coder
    Join Date
    Aug 2006
    Posts
    1,138
    Thanks
    7
    Thanked 257 Times in 256 Posts
    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

  • Users who have thanked tracknut for this post:

    avaxcontrol (10-19-2012)

  • #3
    New to the CF scene
    Join Date
    Oct 2012
    Posts
    7
    Thanks
    4
    Thanked 0 Times in 0 Posts
    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 -->

  • #4
    New to the CF scene
    Join Date
    Oct 2012
    Posts
    7
    Thanks
    4
    Thanked 0 Times in 0 Posts
    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 -->

  • #5
    Senior Coder
    Join Date
    Aug 2006
    Posts
    1,138
    Thanks
    7
    Thanked 257 Times in 256 Posts
    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

  • Users who have thanked tracknut for this post:

    avaxcontrol (10-19-2012)

  • #6
    New to the CF scene
    Join Date
    Oct 2012
    Posts
    7
    Thanks
    4
    Thanked 0 Times in 0 Posts
    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

  • #7
    Senior Coder
    Join Date
    Aug 2006
    Posts
    1,138
    Thanks
    7
    Thanked 257 Times in 256 Posts
    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

  • Users who have thanked tracknut for this post:

    avaxcontrol (10-19-2012)

  • #8
    New to the CF scene
    Join Date
    Oct 2012
    Posts
    7
    Thanks
    4
    Thanked 0 Times in 0 Posts
    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

  • #9
    Senior Coder
    Join Date
    Aug 2006
    Posts
    1,138
    Thanks
    7
    Thanked 257 Times in 256 Posts
    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

  • Users who have thanked tracknut for this post:

    avaxcontrol (10-19-2012)

  • #10
    New to the CF scene
    Join Date
    Oct 2012
    Posts
    7
    Thanks
    4
    Thanked 0 Times in 0 Posts
    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

  • #11
    New to the CF scene
    Join Date
    Oct 2012
    Posts
    7
    Thanks
    4
    Thanked 0 Times in 0 Posts
    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

  • #12
    Senior Coder
    Join Date
    Aug 2006
    Posts
    1,138
    Thanks
    7
    Thanked 257 Times in 256 Posts
    Awesome!

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

    Dave


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •