Request: Confirm Email Address
Moderator: mkoch227
Request: Confirm Email Address
A great job on this script. I would like to see the following feature on the ticket submission form:
Email address: ____________________
Re-enter (confirm) Email address: ________________
I have found that some people enter a wrong email address (inadvertantly). If they do that, there is no way we can contact them.
Having them re-enter their email address - and having the script validate that both emails match - increases the odds that the email is correct.
Thank you for considering this.
Email address: ____________________
Re-enter (confirm) Email address: ________________
I have found that some people enter a wrong email address (inadvertantly). If they do that, there is no way we can contact them.
Having them re-enter their email address - and having the script validate that both emails match - increases the odds that the email is correct.
Thank you for considering this.
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here 
You should follow me on Twitter here
Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...
Also browse for php hosting companies, read php books, find php resources and use webmaster tools


Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...
Also browse for php hosting companies, read php books, find php resources and use webmaster tools
Integration with "Email Piping"
Hi, if anyone needs to add this feature but he/she has already added the email piping (aka email2ticket) feat, just edit the file
process_email.php
adding the line
$_POST['email2'] = $email;
Cheers
Vega
process_email.php
adding the line
$_POST['email2'] = $email;
Cheers
Vega
Re:
Hi, any chance of reposting a 'working' link to this mod and also confirming if it will work with v2.2?Klemen wrote:Try this:
http://www.phpjunkyard.com/extras/hesk0 ... _email.zip
Mucho thanko

Re: Request: Confirm Email Address
It's included by default in version 2.3
Now cross your finger that the beta will be out soon
Now cross your finger that the beta will be out soon

Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here 
You should follow me on Twitter here
Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...
Also browse for php hosting companies, read php books, find php resources and use webmaster tools


Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...
Also browse for php hosting companies, read php books, find php resources and use webmaster tools
Re: Request: Confirm Email Address
Nice one
Hopefully I will be able to just 'borrow' that bit to bolt in to v2.2 rather than spend days re doing my theme when it arrives 


Re: Request: Confirm Email Address
Hey everyone,
Until Klemen gets this done, if you want a quick solution, you can use a bit of javascript. Let me walk you through what I have done for my client.
First, add the second email field to your form. On the index.php page, look forA few lines below that you will find the email field. It looks like thisEnter the following code, immediately below the closing </td>tag. This adds the new email field to your form.Please note that the reason I have references to "hesklang['email2']" is you need to place an entry in your text.php file. I will give you those instruction later in this post. There is a bit more code than you need in that paste, is because I plan on implementing that into a new MM_ValidateForm later, and I did not want to redo everything.
Next, place this javascript below the table that contains these three entries, on the line immediately below the table closing tag "</table>".
This will only alert your user one time, immediately after they leave the second email field that the two do not match.
Next, open your language/en/text.php file and add the followingYou can add that anywhere in the file, but I added it at around line 130, just to keep data grouped together.
I hope this helps everyone. When I get the function MM_validateForm done, if Klemen does not object, I will post it here.
Until Klemen gets this done, if you want a quick solution, you can use a bit of javascript. Let me walk you through what I have done for my client.
First, add the second email field to your form. On the index.php page, look for
Code: Select all
<form method="post" action="submit_ticket.php" name="form1" enctype="multipart/form-data">
Code: Select all
<td style="text-align:right" width="150"><?php echo $hesklang['email']; ?>: <font class="important">*</font></td>
<td width="80%"><input type="text" name="email" size="40" maxlength="50" value="<?php if (isset($_SESSION['c_email'])) {echo stripslashes(hesk_input($_SESSION['c_email']));} ?>" /></td>
Code: Select all
<td style="text-align:right" width="150"><?php echo $hesklang['email2']; ?>: <font class="important">*</font></td>
<td width="70%"><input name="email2" type="text" id="email2" onblur="VerifyDataIsIdentical('email','email2')" value="<?php if (isset($_SESSION['c_email2'])) {echo stripslashes(hesk_input($_SESSION['c_email2']));} ?>" size="40" maxlength="50" /></td>
Next, place this javascript below the table that contains these three entries, on the line immediately below the table closing tag "</table>".
Code: Select all
<script type="text/javascript">
var d1pastval = new String();
var d2pastval = new String();
function VerifyDataIsIdentical(d1,d2) {
var d1val = document.getElementById(d1).value;
var d2val = document.getElementById(d2).value;
if(d1val.length &&
d2val.length &&
(d1val != d2val) &&
( (d1val != d1pastval) || (d2val != d2pastval) )) {
// alert message is between quotes on the next line. You may change this to any message you want. //
alert("E-mails must match");
d1pastval = d1val;
d2pastval = d2val;
return false;
}
return true;
}
</script>
Next, open your language/en/text.php file and add the following
Code: Select all
$hesklang['email2']='Please confirm your E-mail';
I hope this helps everyone. When I get the function MM_validateForm done, if Klemen does not object, I will post it here.
Re: Request: Confirm Email Address
Hi, I never thought of just validating it using an in-page routine - I'd got it in my head that it would need to be totally tied in with the whole Hesk database etc.. Sometimes the solution is so easy it escapes me lol
Just thinking now that a quick visit to 'Dynamic Drive' will lead me to a decent email confirmation script that will do the job nicely (unless JavaScript is disabled of course so will need to degrade nicely).
Thanks for that 
I look forward to your next post completing this great (and now so blatantly simple mod)
Just thinking now that a quick visit to 'Dynamic Drive' will lead me to a decent email confirmation script that will do the job nicely (unless JavaScript is disabled of course so will need to degrade nicely).


I look forward to your next post completing this great (and now so blatantly simple mod)

Re: Request: Confirm Email Address
Thanks for sharing!
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here 
You should follow me on Twitter here
Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...
Also browse for php hosting companies, read php books, find php resources and use webmaster tools


Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...
Also browse for php hosting companies, read php books, find php resources and use webmaster tools
Re: Request: Confirm Email Address
Raven and Klemen, you are welcome.
I was wondering if something like this might work, tooI haven't had time to do any testing. I need to finish the helpdesk for my client. I am also working on integrating a live chat module if anyone is interested.
I was wondering if something like this might work, too
Code: Select all
<?php if(isset($_REQUEST['email']) || isset($_REQUEST['email2']))?>
<?php if($_REQUEST['email'] != $_REQUEST['email2']){$errors[] = "Please correctly confirm your email address";} ?>
<?php if(isset($_REQUEST['email2'])){unset($_REQUEST['email2']);} ?>
Re: Request: Confirm Email Address
Agreed, it would be great to use the same type of error message you get when something else goes wrong as well as perform the email check.
Not getting too much PC time these days what with my 5 week old keeping me busy phew! If you manage to get this working with the Hesk error message as opposed to a javascript popup please share
Not getting too much PC time these days what with my 5 week old keeping me busy phew! If you manage to get this working with the Hesk error message as opposed to a javascript popup please share

Re: Request: Confirm Email Address
Hi Raven,
Sorry I haven't been around lately. The chat/live help addon has taken more time than I expected.
Wow, a baby...congratulations. Your life will never be the same.
You will lose lots of sleep, stay up nights worrying, even be heart-broken from time to time, but it is the best experience of your entire lifetime.
I will share when I get everything done. I think I should post it to Klemen, privately, first.
Sorry I haven't been around lately. The chat/live help addon has taken more time than I expected.
Wow, a baby...congratulations. Your life will never be the same.

I will share when I get everything done. I think I should post it to Klemen, privately, first.
Re: Request: Confirm Email Address
Feel free to share it with the public, it's your work 

Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here 
You should follow me on Twitter here
Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...
Also browse for php hosting companies, read php books, find php resources and use webmaster tools


Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...
Also browse for php hosting companies, read php books, find php resources and use webmaster tools
Re: Request: Confirm Email Address
Hi and thank you for the congratulationsfonz wrote:Hi Raven,
Sorry I haven't been around lately. The chat/live help addon has taken more time than I expected.
Wow, a baby...congratulations. Your life will never be the same.You will lose lots of sleep, stay up nights worrying, even be heart-broken from time to time, but it is the best experience of your entire lifetime.
I will share when I get everything done. I think I should post it to Klemen, privately, first.

Cheers,
One chuffed Dad *HUGE SMILE*