Email Form on Header

Rate this topic: Evaluations: 0, 0.00 on the average.Evaluations: 0, 0.00 on the average.Evaluations: 0, 0.00 on the average.Evaluations: 0, 0.00 on the average.Evaluations: 0, 0.00 on the average.Evaluations: 0, 0.00 on the average.
GK User
Mon Jun 12, 2017 1:02 pm
Reply with quote
Report this post
Hi everyone and thanks in advance for the help.
I have read some other post, I know that the form in the header is just an example and that it would be linked to a system like (eg) acy mailing.

Instead, I would like to use it as a simple email form to get the user's email address (as a sender of the message) with a fixed object set by me, to my dedicated email address.
This way then, I could handle an automatic email reply with the sending of a document.

How should I modify the current form to achieve the desired result? (Unfortunately I do not have PHP skills :oops: )

Thank you
User avatar
Fresh Boarder

teitbite
Sat Jun 17, 2017 1:07 pm
Reply with quote
Report this post
Hi

Form will need small modification:

Code: Select all
<form class="gk-form" action="" method="post">
    <div>
        <input placeholder="Email address ..." type="email" name=>
        <input value="Get Started today!" type="submit" name="form_email">
    </div>
</form>


than in /layout/default.php You will need:

Code: Select all
<?php
if( JRequest::getVar('form_email') ):
    mail ( '[email protected]' , 'New mail' , JRequest::getVar('form_email') )
endif;
?>
User avatar
Moderator


cron
Remember me
Register New Account
If you are old Gavick user, click HERE for steps to retrieve your account.