Hi.
When i try to send the form i've this message:
Can you help me? Please!!
When i try to send the form i've this message:
"PHP Notice: Undefined variable: omittedlist in C:\Inetpub\wwwroot\aaa\components\com_chronocontact\chronocontact.php on line 378 PHP Notice: Undefined property: stdClass::$name in C:\Inetpub\wwwroot\aaa\components\com_chronocontact\chronocontact.php on line 389 PHP Notice: Undefined property: stdClass::$email in C:\Inetpub\wwwroot\aaa\components\com_chronocontact\chronocontact.php on line 389 PHP Notice: Undefined property: stdClass::$submit in C:\Inetpub\wwwroot\aaa\components\com_chronocontact\chronocontact.php on line 389"
Can you help me? Please!!
Hi nervosud,
These are PHP notices about things that 'might' cause a problem. Usually you can turn them off by setting 'Error Reporting' to 'System Default' in your site Global Configuration.
Bob
These are PHP notices about things that 'might' cause a problem. Usually you can turn them off by setting 'Error Reporting' to 'System Default' in your site Global Configuration.
Bob
just add element titles, e.g.:
name=Name
and fill something into a:
General - Omitted fields names
e.g. 'Nothing' there must be some value to not display the notice...
Jan
name=Name
and fill something into a:
General - Omitted fields names
e.g. 'Nothing' there must be some value to not display the notice...
Jan
Hi Jan,
The problem with Error messages is that PHP5 issues warnings and notices about undeclared variables; and ChronoForms in effect creates a new set of variables from the form field names.
Max really neeeds to put in a few lines of code to predeclare them and avoid the messages but it's not in the releases so far.
It's easy enough to code around if you know a little PHP but hard to explain to users who don't know any.
Have you hit a problem with this? If so, post the error caode and I'll give you a fix for it.
Bob
PS Congratualtions on PhocaGallery, it's an excellent extension. I've just been installing a version this week.
The problem with Error messages is that PHP5 issues warnings and notices about undeclared variables; and ChronoForms in effect creates a new set of variables from the form field names.
Max really neeeds to put in a few lines of code to predeclare them and avoid the messages but it's not in the releases so far.
It's easy enough to code around if you know a little PHP but hard to explain to users who don't know any.
Have you hit a problem with this? If so, post the error caode and I'll give you a fix for it.
Bob
PS Congratualtions on PhocaGallery, it's an excellent extension. I've just been installing a version this week.
Thank you....
I got the same errors as nervosud get. But if I added the items I have wrote, no errors are displayed now, so if nervosud add:
e.g. value 'Nothing' into Omitted field, the variable will be filled (notice will be not displayed)
If he add into elements titles, e.g.:
name=Name
the $name variable will be exist and no notice will be displayed...
One question: is there a possibility to validate the form on server side ?
Thank you, Jan
I got the same errors as nervosud get. But if I added the items I have wrote, no errors are displayed now, so if nervosud add:
e.g. value 'Nothing' into Omitted field, the variable will be filled (notice will be not displayed)
If he add into elements titles, e.g.:
name=Name
the $name variable will be exist and no notice will be displayed...
One question: is there a possibility to validate the form on server side ?
Thank you, Jan
Hi Jan,
Thanks for that.
You an validate the form on the Server side, but there's nothing provided 'out of the box'.
You can create your own validation code in the 'OnSubmit before' box then return to the form with
Thanks for that.
You an validate the form on the Server side, but there's nothing provided 'out of the box'.
You can create your own validation code in the 'OnSubmit before' box then return to the form with
showform($_POST);
For this to re-show the input values correctly the form must have the $_POST array variables as the input values e.g.<input name='email" type="text" value="<?php echo $_POST['email']; ?> />
Bob
maybe this will disable the notices (for me it works), Jan
chronocontact.php, row 341 +
chronocontact.php, row 341 +
$fields = array();
foreach ( $names as $name ) {
if (isset($_POST[$name])) {
if (is_array($_POST[$name])) {
$fields[$name] = implode(", ", $_POST[$name]);
} else {
$fields[$name] = $_POST[$name];
}
} else {
$fields[$name] = '';
}
}
Hi Jan,
Looks good to me, I call a function that does something similar:
Looks good to me, I call a function that does something similar:
/**
* If the submitted variable is an array
* convert it into a string
* If it's not set then set it
*
* @param unknown_type $var
* @return string
*/
function preSave($var) {
if ( isset( $var ) ) {
if ( is_array( $var ) ) {
$var = implode( ',', $var );
}
} else {
$var = "";
}
return $var;
}
Bob
great to hear it...
BTW: the ChronoForms component is great and powerfull, I will vote for it...
thank you, Jan
BTW: the ChronoForms component is great and powerfull, I will vote for it...
thank you, Jan
Hmmm...
I'm not sure I understand. I added Entries into those fields that were suggested here but I am still getting this error:
Notice: Undefined property: stdClass::$name in C:\joomla\components\com_chronocontact\chronocontact.php on line 364
Notice: Undefined property: stdClass::$title in C:\joomla\components\com_chronocontact\chronocontact.php on line 364
Notice: Undefined property: stdClass::$suggestion in C:\joomla\components\com_chronocontact\chronocontact.php on line 364
Notice: Undefined property: stdClass::$button in C:\joomla\components\com_chronocontact\chronocontact.php on line 364
I'm not sure I understand. I added Entries into those fields that were suggested here but I am still getting this error:
Notice: Undefined property: stdClass::$name in C:\joomla\components\com_chronocontact\chronocontact.php on line 364
Notice: Undefined property: stdClass::$title in C:\joomla\components\com_chronocontact\chronocontact.php on line 364
Notice: Undefined property: stdClass::$suggestion in C:\joomla\components\com_chronocontact\chronocontact.php on line 364
Notice: Undefined property: stdClass::$button in C:\joomla\components\com_chronocontact\chronocontact.php on line 364
This topic is locked and no more replies can be posted.