ChronoEngine.com homepage

Forums

Please write a review for the extension you are using on the Joomla extensions directory before posting a new question as we are being spammed by many negative reviews.

Thank you for your support!

problem with reply to email and validation mobile

Qbik 07 Feb, 2008
Is it correct that I write a input name in settings of form?

For example i have something like that (this is a part of form
<div class="form_kontakt"><label for="nazwisko">Nazwisko:</label>
   <input name="nazwisko" type="text"></div>
   <div class="form_kontakt"><label for="email">Adres email:</label>

and in settings in back end i wrote
From email: email
From name: nazwisko
ReplyTo email: email

and when I received this email I have
nazwisko <email@s16.ehost.pl>

ehost.pl is my hosting service

And the second problem how to validate a mobile number?
There is always 9 number and only number. How to validate it
Now I choose the 2- validate-number (a valid number) and when i write only 3 number it allow it😟


Is it possible to translate a validation alert to other language?

Thx for help
GreyHead 07 Feb, 2008
Hi Qbik,

If you want to use a field-name then there must be an 'input' field (or select, etc) for it. In the clip you posted there is no input for email. This may just be because you pasted a small part . . .

You must put full email addresses in the email boxes on the General Tab; if you want to use field names these must go on the Special Fields tab.

You can create a custom validation script to put in the ChronoForms validation Javascript if you need one. Please see Andrew Tetlaw's site for instructions.

You can translate the messages in the validation Javascript, I've posted twice about this here in the last few days (try searching for 'German'.

Bob
Qbik 07 Feb, 2008


If you want to use a field-name then there must be an 'input' field (or select, etc) for it. In the clip you posted there is no input for email. This may just be because you pasted a small part . . .

Yes, sorry

ok all form look like this (this is an universal contact form)
<div class="form_kontakt"><label for="nazwisko">Imię i Nazwisko:</label>
<input name="nazwisko" type="text"></div>
<div class="form_kontakt"><label for="email">Adres email:</label>
<input class="required validate-email" name="email" type="text"></div>
<div class="form_kontakt"><label for="telefon">Telefon <small>502072464</small>:</label>
0 - <input name="telefon" type="text" maxlength="9" size="16"></div>
<div class="form_kontakt"><label for="wiadomosc">Wiadomość:</label>
<textarea style=" BACKGROUND: #fcfcfc; WIDTH: 300px; HEIGHT: 100px" name="wiadomosc"></textarea></div>
<input name="Submit" type="submit" value="Wyślij wiadomość" title="wyślij wiadomość" alt="wyślij wiadomość">

Ok when I done the same as it is in this tutorial http://www.chronoengine.com/content/view/36/39/

I have message that when i choose to send email i Have to write 'From Email' and 'From name' When i fill this two input with admin and [email]admin@example.com[/email] in email i have message from <admin> [email]admin@example.com[/email] and without subject (I write subject kontakt z www) but in message this field is empty

So what is wrong<br><br>Post edited by: Qbik, at: 2008/02/07 18:48
Qbik 08 Feb, 2008

[cut]
You can create a custom validation script to put in the ChronoForms validation Javascript if you need one. Please see Andrew Tetlaw's site for instructions.
[cut]
I Can't find it on his page😟 If You can help me with some advice I'll be very grateful
GreyHead 10 Feb, 2008
Hi Qbik,

Google 'Andrew Tetlaw' and his site has the first two results for me. See this page the part about custom validation is about half-way down the page.

Bob<br><br>Post edited by: GreyHead, at: 2008/02/09 20:16
Qbik 10 Feb, 2008
thx
I'll try to write my own valdation script😉

What about reply-to field i can't solve the problem and it still doesn't work as it should

attached images show my settings
http://img136.imageshack.us/img136/2350/chronoforms1bf6.th.png

http://img149.imageshack.us/img149/5072/chronoforms2gp2.th.png<br><br>Post edited by: Qbik, at: 2008/02/10 17:38
GreyHead 10 Feb, 2008
Hi Qbik,

You can't use field names on the General Tab, if you want to use Field names then they have to go on the Special Fields tab.

Bob
Qbik 10 Feb, 2008
Hi Qbik,

You can't use field names on the General Tab, if you want to use Field names then they have to go on the Special Fields tab.

Bob

I want to left it blank but when i do that there is a warning Popup message "If You choosed to email results then You must add: Email Address, Email Subject, From Name and From Email"


So what should I do to have a name and reply address at email?
GreyHead 11 Feb, 2008
Hi Qbik,

Max has too much validation there - just put a dummy email address in the General tab [email]user@example.com[/email] will do fine.

Bob
Qbik 11 Feb, 2008
ok Thx almost everything working now
I have good name in from mail😉

But how to menage to work an email in reply-to
GreyHead 11 Feb, 2008
Hi Qbik,

You can add a user email in ReplyTo by posting some code in the 'OnSubmit before email' box. You'll find the code in the forums here.

We don't recommend this as it often causes problems with email being sent. Many ISPs check the Reply to email to make sure that the domain is is the same as the sending domain (probably your site domain) if it isn't then the email may be bounced, marked as spam or just dropped.

If you want a reliable way to reply to the submitter then use the Email template and put in a reply link.

Bob<br><br>Post edited by: GreyHead, at: 2008/02/11 14:44
Qbik 11 Feb, 2008
OK thx I understand now


One more question about validate I still can't modify originally added validation.js

with translation and with a few changes added, How I can do that?
GreyHead 12 Feb, 2008
Hi Qbik,

Which bit can't you do? It should just be a question of opening the file in a text editor, changing it and re-saving it. Then you'd have to ftp it back up to your site if it's not local.

Bob
Qbik 12 Feb, 2008
I change it in my PC and upload it to forum too but i can't send it to my server
When I want to do that i have that info


Command: STOR validation_pl.js
Response: 553-Can't open that file: Permission denied
Response: 553 Rename/move failure: No such file or directory

There is a file attributes set to 644 for validation.js and i can't change it😟

I'm using FileZilla as FTP client
Max_admin 12 Feb, 2008
Hi Qbik,

Install JoomlaXplorer component and use it to Edit/upload files, it works many times when FTP clients not!

Cheers,

Max
Max
ChronoForms developer...
Did you try ChronoMyAdmin for managing your Joomla database tables ?
Qbik 12 Feb, 2008
Ok its working now THX :woohoo:

I have one more question about saving information to table

Is it possible to save information to other table than this made by chronoform?
I have other table in the same server but there is a few record already.

Or where exactly table from chronoform I can find and can I change something there?

I'm thinking about something like this

user put information to the form post it and now there is 3 things
- mail to admin that someone use form and link to url with table look
- to user with information about next step
- add everything to table on other places than chronoform
GreyHead 12 Feb, 2008
Hi Qbik,

Yes, you can just edit the sql in the Autogenerated tab and ChronoForms will use it to save the values in any table you like.

Should be fairly simple to do all three things, the only tricky one is the second email but there's code here to help with that.

Bob
Qbik 13 Feb, 2008
Hi Qbik,

Yes, you can just edit the sql in the Autogenerated tab and ChronoForms will use it to save the values in any table you like.

Should be fairly simple to do all three things, the only tricky one is the second email but there's code here to help with that.

Bob

Ok so work is waiting😉
what kind of code?

ps.
I'm still fighting with telephone number validate

I'm not very good in JS and it only should allow to write 9 numbers [0-9] nothing more, nothing less without '-' and spaces

I try to put something like that
 ['validate-telefon', 'Proszę wpisać poprawny numer telefonu.', {
minLength : 9, notOneOf : ['123456789','012345678'], pattern : new RegExp("^[0-9]+$","gi"«»),
 }],

but i'm not sure it's good or not and what about spaces and '-'


EDIT/

HMM something wrong😟 when i put 9 numbers to form for example 502587786 i have to hit send button 3 times to send.

What's going on?<br><br>Post edited by: Qbik, at: 2008/02/12 23:33
GreyHead 13 Feb, 2008
Hi Qbik,

I've lost track here. Why don't you use the built in validation for a number field? Much simpler than building your own.

To send a second email you need to create your own html for the message and put the code into the 'On Submit after email' box The code looks something like this:
 <?php
$recipient = $_POST['email'];
$html_message = "<html>
<body>
. . . your message here . . .
</body>
</html>";
mosMail($from, $fromname, $recipient, $subject, $html_message, true );
?>
Bob
Qbik 13 Feb, 2008
I don't think about that😉
thx

ok but how to add to this build it number validations this 3 things

minLength : 9, notOneOf : ['123456789','012345678']

When I try to add it after || nothing happened
GreyHead 13 Feb, 2008
Hi Qbik,

I'm still not sure where you are doing this but I think this PHP regex snippet should do what you want
<?php
if (preg_match('/\A\d{9}\Z/', $subject)) {
	# Successful match
} else {
	# Match attempt failed
}
?>
Bob
Qbik 13 Feb, 2008
hmm but where i have to put this in form code?

I try to do everything in validate.js

so now I have something like that
Validation.addAllThese([
	['required', 'To pole jest obowiązkowe.', function(v) {
				return !Validation.get('IsEmpty').test(v);
			}],
	['validate-number', 'Proszę wpisać poprawny numer.', function(v) {
				return Validation.get('IsEmpty').test(v) || (!isNaN(v) && !/^\s+$/.test(v));
			}],
         ['validate-telefon', 'Proszę wpisać poprawny numer telefonu komórkowego (np.502072464).', {
minLength : 9, notOneOf : ['123456789','012345678'], pattern : new RegExp("^[0-9]+$","gi"«»),
 }],
[...]

And after Your post I try to connect 'validate-number' with 'validate-telefon' but i don't know how?
GreyHead 13 Feb, 2008
Hi Qbik,

My mistake, I thought that you were trying to do it in PHP. Too many posting as the moment🙂

Please try this
	['validate-telefon', 'Proszę wpisać poprawny numer telefonu komórkowego (np.502072464).', function(v) {
                return Validation.get('IsEmpty').test(v) 
                || /^\d{9,12}$/.test(v)
                ||  Validation.get('notOneOf : ['123456789','012345678']').test(v) 
            }],
Bob
Qbik 13 Feb, 2008
THX but there is something wrong with this code😑

when I copy Your code and overwrite mine validation stop working, when i change once more to mine its working😟

What's going on?<br><br>Post edited by: GreyHead, at: 2008/02/13 16:57
GreyHead 13 Feb, 2008
Hi Qbik,

Have been fiddling with this for half-an-hour but I can't get the regExp to work. I have notOneOf working OK, and the regexp shows the warning but doesn't allow any number to be submitted.

I'll try again later.

Bob
Qbik 14 Feb, 2008
ok

I cut it (notOneOf) from code for while

Everything work for now thx a lot

tomorrow I'll post a code

I found table in mySQL base from form and now I have to only write some page to view it😀

Post edited by: Qbik, at: 2008/02/13 21:23

ok i solve the problem with radio button<br><br>Post edited by: Qbik, at: 2008/02/13 22:48
Qbik 14 Feb, 2008
ok as I said before this is what i wrote to see record from table

On red Is personal settings

This site is made for Polish user so if You want to change it and have a problem write to me😉
<html>
<head>
<META HTTP-EQUIV="Content-type" CONTENT="text/html; charset=iso-8859-2">
<meta name="Author" content="Qbik"/> 
<title>WIKARO Przegląd rezerwacji</title>
<script type="text/javascript">
	function goBlue(currentid){
	  document.getElementById(currentid).bgColor="#E7E7FC";
	}
	function goWhite(currentid){
	document.getElementById(currentid).bgColor="WHITE";
	}
</script>
</head>
<body>
<?php
if($_REQUEST['passwd'] == "PASSWORD"«»){
	?>

<TABLE CELLSPACING=0 CELLPADDING=6 RULES=GROUPS FRAME=BOX>
<THEAD>
<TR>
<TH>ID</TH>
<TH>Nazwisko</TH>
<TH>Ilość osób</TH>
<TH>Telefon</TH>
<TH>E-Mail</TH>
<TH>Skipass</TH>
<TH>Info o osobach</TH>
<TH>Jak trafił</TH>
<TH>Komentarz</TH>
<TH>Akcja</TH>
</TR>
</THEAD>
<FONT SIZE=6>
<TBODY>

<?php

$db=mysql_connect ("some_db_user"«») or die ('Błąd podłączenia do bazy danych: ' . mysql_error());
mysql_select_db ("Joomla_MySQL_db", $db);

if ($_REQUEST['deleterow'] > 0){

$sql = "DELETE FROM form_table_made_by_chronoform WHERE cf_id = ".$_REQUEST['deleterow'].";";

     $result = mysql_query($sql);
     if(!$result) {
     $err=mysql_error();

     print $err;

     ob_clean();

     exit();
     }
     }

	$sql = "SELECT cf_id, nazwisko, liczba_osob, email, telefon, skipass, dane_rodziny, jak, opinia FROM form_table_made_by_chronoform ORDER BY cf_id ASC;";

	$result = mysql_query($sql);

	if(!$result) {
		$err=mysql_error();
                print $err;
                ob_clean();
                exit();
        }
	/*
                <TH>ID</TH>
                <TH>Nazwisko</TH>
                <TH>Ilość osób</TH>
                <TH>Telefon</TH>
                <TH>E-Mail</TH>
                <th>skipass</TH></th>
                <TH>Info o osobach</TH>
                <TH>Jak trafił</TH>
                <TH>Komentarz</TH>
                <TH>Akcja</TH>
                */
	$num=mysql_numrows($result);
        $i=0;
        while ($i < $num){

		echo("<TR ID=\"".mysql_result($result,$i,"cf_id"«»)."\" onMouseOver=\"goBlue('".mysql_result($result,$i,"cf_id"«»)."')\" onMouseOut=\"goWhite('".mysql_result($result,$i,"cf_id"«»)."')\"> "«»);
                echo("<TD>".mysql_result($result,$i,"cf_id"«»)."</TD>"«»);
	             echo("<TD>".mysql_result($result,$i,"nazwisko"«»)."</TD>"«»);
                echo("<TD>".mysql_result($result,$i,"liczba_osob"«»)."</TD>"«»);
		echo("<TD>".mysql_result($result,$i,"email"«»)."</TD>"«»);
                echo("<TD>".mysql_result($result,$i,"telefon"«»)."</TD>"«»);
                echo("<TD>".mysql_result($result,$i,"skipass"«»)."</TD>"«»);
                echo("<TD>".mysql_result($result,$i,"dane_rodziny"«»)."</TD>"«»);
                echo("<TD>".mysql_result($result,$i,"jak"«»)."</TD>"«»);
                echo("<TD>".mysql_result($result,$i,"opinia"«»)."</TD>"«»);
                ?>
                <TD>

			<form action="adress_of_this_view_site" method="post" enctype="multipart/form-data" name="form5">
			<input name="passwd" type="hidden" value="<?php echo($_REQUEST['passwd']);?>">
			<input name="deleterow" type="hidden" value="<?php echo(mysql_result($result,$i,"cf_id"«»));?>">
			<input name="Submit" type="submit" value="Usuń">
			</form>
		</TD>
                <?php
                echo("</TR>"«»);
                $i++;
        }

//	echo("<P>Ilość osób: " . $num . "</P>"«»);
	$sql = "SELECT COUNT(cf_id) FROM form_table_made_by_chronoform;";
	$result = mysql_query($sql);
	if(!$result) {
		$err=mysql_error();
		print $err;
		ob_clean();
		exit();
	}

	echo("<P>Ilość rezerwacji: " . mysql_result($result, 0) . "</P>"«»);
	$sql = "SELECT SUM(liczba_osob) FROM form_table_made_by_chronoform;";
	$result = mysql_query($sql);
	if(!$result) {
		$err=mysql_error();
		print $err;
		ob_clean();
		exit();
	}
	echo("<P>Łączna ilość osób: " . mysql_result($result, 0) . "</P>"«»);
	mysql_close($db);
?>

</TBODY>
</FONT>
<TFOOT>

<TR> <TH align=right COLSPAN=8><?php echo("Razem rezerwacji:"«»); echo($num); ?></th>
<th align=left colspan=5>
<?php 
if(!$result) {
		$err=mysql_error();
		print $err;
		ob_clean();
		exit();
	}
	echo(" Łączna ilość osób: "«»);
	echo( mysql_result($result, 0));
	 ?>
</th></TR>
</TABLE>
<TABLE>
	<TR>
		<TD>
			<form action="adress_of_this_view_site" method="post" enctype="multipart/form-data" name="form2">
			<input name="passwd" type="hidden" value="<?php echo($_REQUEST['passwd']);?>">
			<input name="deleterow" type="hidden" value="-1">
			<input name="Submit" type="submit" value="Odśwież">
			</form>
		</TD>
		<TD>
			<form action="adress_of_this_view_site" method="post" enctype="multipart/form-data" name="form3">
			<input name="passwd" type="hidden" value="">
			<input name="deleterow" type="hidden" value="-1">
			<input name="Submit" type="submit" value="Wyjdź">
			</form>
		</TD>
	</TR>
<TABLE>

<?php
} 
else{
	if (strlen($_REQUEST['passwd']) > 0){
		echo("Nieprawidłowe hasło<BR>"«»);
	}
	echo("<form action=\"adress_of_this_view_site\" method=\"post\" enctype=\"multipart/form-data\" name=\"form1\">"«»);
	echo("<table><tr><td class=\"left\"><strong>Hasło: </strong></td><td><input name=\"deleterow\" type=\"hidden\" value=\"-1\"><input name=\"passwd\" type=\"password\" size=\"30\"></td><td><input name=\"Submit\" type=\"submit\" value=\"Wejdź\"></td></tr></table>"«»);
	echo("</form>"«»);
	ob_clean();
	exit();
}
?>
</body>
</html>
<br><br>Post edited by: Qbik, at: 2008/02/14 15:59
GreyHead 14 Feb, 2008
Hi,

Qbik's form should work OK (though the **red** bits don't show up inside the code tags here). But it bypasses pretty much all the Joomla protection and structure and I wouldn't recommend it for live use.

It could easily be re-written though to use the Joomla registration and database code.

Bob
Qbik 14 Feb, 2008
But it bypasses pretty much all the Joomla protection and structure and I wouldn't recommend it for live use.

What do You think exactly??


It could easily be re-written though to use the Joomla registration and database code.

I think about that but I'm newbie in Joomla so if It possible that someone (You) think about rewritten this for Joomla User

Link to this "site of view record" is send to admin email after someone use form on site, only way to see it is to write direct link on browser or use link from email

ok I'll remove all red places😉<br><br>Post edited by: Qbik, at: 2008/02/14 16:04
Qbik 27 Feb, 2008
ok i solve the problem, restore from backup😉<br><br>Post edited by: Qbik, at: 2008/02/27 15:03
This topic is locked and no more replies can be posted.

2Checkout.com

2CheckOut.com Inc. (Ohio, USA) is an authorized retailer for goods and services provided by ChronoEngine.com