I use CF V3.1_RC5.3, Plugin_V3.1_RC5.2, mod V3.1_RC5.2
1) When testing SSV, if the form is presented as a component (menu item), I get the error message I need.
But when the form is presented as part of an article, using the plugin - I don't get any message, though the validation works.
2) IN both cases, the posted data doesn't load into the fields. I read that you are planing a new version of the component, but also that the version I use suppose to handle this issue. Can I do anything?
Understanding the architecture would have been helpful: Where the SSV gets in? Does it come before the form, or in the head of page? Can I simply define variables in the SSV code which will be sent to the form inputs, in case we have POST situation?
Should I add a container for the message - but then, how should I trigger it - by detecting the POST? And what variable should I pass in which will include the 'return' from the SSV?
I know - too many questions in one post. But understanding the flow and logic will give us more flexibility...
1) When testing SSV, if the form is presented as a component (menu item), I get the error message I need.
But when the form is presented as part of an article, using the plugin - I don't get any message, though the validation works.
2) IN both cases, the posted data doesn't load into the fields. I read that you are planing a new version of the component, but also that the version I use suppose to handle this issue. Can I do anything?
Understanding the architecture would have been helpful: Where the SSV gets in? Does it come before the form, or in the head of page? Can I simply define variables in the SSV code which will be sent to the form inputs, in case we have POST situation?
Should I add a container for the message - but then, how should I trigger it - by detecting the POST? And what variable should I pass in which will include the 'return' from the SSV?
I know - too many questions in one post. But understanding the flow and logic will give us more flexibility...
Hi menchee,
The servers ide (and any other) error messages are saved in the user session and then published from chronocontact.html.php using this code snippet
The posted data is also saved in the user session, and seems to get republished for me. I wonder if there is some reason why session saving isn't working on your form?
An alternative method for the error messages would be to use the Joomla message system
Bob
The servers ide (and any other) error messages are saved in the user session and then published from chronocontact.html.php using this code snippet
<?php if($MyForm->formerrors){ ?>
<span class="cf_alert"><?php echo '<ol>'.$MyForm->formerrors.'</ol>'; ?></span>
<?php } ?>
As far as I can see the same code should run if for both the component and the plugin. I haven't dug far enough to see what the differnce is.The posted data is also saved in the user session, and seems to get republished for me. I wonder if there is some reason why session saving isn't working on your form?
An alternative method for the error messages would be to use the Joomla message system
<?php
global $mainframe;
$mainframe->enqueuemessage('Some message', 'error);
?>
This seems to work reliably **provided** that the user template supports Joomla 1.5 system messages (and many don't).Bob
Hi Bob, thank for the two leads you gave me. I'll try playing with them.
I hope Max will go deeper into this post with more details.
Thanks again!
I hope Max will go deeper into this post with more details.
Thanks again!
Hi menchee,
It should load form data in both cases if the "try to republish" option is set to true under the general tab, the error should be shown in both cases too as you have the latest version opf everything, you may contact me through the "contact us" page to get the latest version files which has very few fixes and see if it will fix anything!
Cheers
Max
It should load form data in both cases if the "try to republish" option is set to true under the general tab, the error should be shown in both cases too as you have the latest version opf everything, you may contact me through the "contact us" page to get the latest version files which has very few fixes and see if it will fix anything!
Cheers
Max
Hey Max,
When I tried everything in my local machine, both message and republish worked.
I even used Bob's suggestion and added the next code to the form in order to add a message to the Jommla's error dedicated container to point the user to the form's validation message (when I embed the form to an article, the form is way down bellow the fold line):
But it doesn't work in the remote site. I updated both sites the same way (had to uninstall the plugin and module before the new installation. since I got an error message about existing folder or file).
Since I don't even get the joomla error message I coded, I understand that the $MyForm->formerrors is not triggered. Maybe the upgrading in remote site wasn't successful. Not sure what file is missing.
I'll contact you to get the latest files. Maybe it will solve the problem.
Thanks!!
Emanuel.
When I tried everything in my local machine, both message and republish worked.
I even used Bob's suggestion and added the next code to the form in order to add a message to the Jommla's error dedicated container to point the user to the form's validation message (when I embed the form to an article, the form is way down bellow the fold line):
<?php
if($MyForm->formerrors){
global $mainframe;
$mainframe->enqueuemessage('The form is incomplete. Please read the messages in the form bellow', 'error');
}
?>
But it doesn't work in the remote site. I updated both sites the same way (had to uninstall the plugin and module before the new installation. since I got an error message about existing folder or file).
Since I don't even get the joomla error message I coded, I understand that the $MyForm->formerrors is not triggered. Maybe the upgrading in remote site wasn't successful. Not sure what file is missing.
I'll contact you to get the latest files. Maybe it will solve the problem.
Thanks!!
Emanuel.
This seems to work reliably **provided** that the user template supports Joomla 1.5 system messages (and many don't).
Hi,
I would appreciate the option to handle error messages using JError::raiseNotice in next version of ChronoForms. As you say, some tepmlates are missing <jdoc:include type="message" /> but not the ones I work on and I'd like to style all system messages same way.
Greetings!
Piotr
This topic is locked and no more replies can be posted.