I am using ChronoForms 3.1 RC5.5 with Joomla 1.5.15.
First, I have a question. Why when trying to print the submitted form values of input fields in the on submit before or after email do they only display if I run them in the "on submit after email". For instance, if I put
in the on submit before, it will not display. However, if I put it in the after, it does display?
Now, onto my real question...
I have searched the forums, and thought I had the answer, but this doesn't seem to work. I have 6 checkboxes on a form, and each one has the name "terms[]" with a different value. If I check all of the boxes and submit the form, I can see (using HttpFox) that all of the terms[] are in the request. However, I can not get them out. I have tried the foreach like this:
I've also tried the implode like this:
What am I missing?
Thanks,
Kris
First, I have a question. Why when trying to print the submitted form values of input fields in the on submit before or after email do they only display if I run them in the "on submit after email". For instance, if I put
<?php echo "hello";?>
in the on submit before, it will not display. However, if I put it in the after, it does display?
Now, onto my real question...
I have searched the forums, and thought I had the answer, but this doesn't seem to work. I have 6 checkboxes on a form, and each one has the name "terms[]" with a different value. If I check all of the boxes and submit the form, I can see (using HttpFox) that all of the terms[] are in the request. However, I can not get them out. I have tried the foreach like this:
foreach ( $_POST['terms'] as $term ) {
echo "$term ";
}
I've also tried the implode like this:
echo implode(" ", $_POST['terms']);
What am I missing?
Thanks,
Kris
Hi khenn,
The OnSubmit Before code is only executed if you have 'Send Emails' set to 'Yes' in the form General tab.
Bob
The OnSubmit Before code is only executed if you have 'Send Emails' set to 'Yes' in the form General tab.
Bob
Hi Kris,
I'm not sure why your checkbox code doesn't work. Try setting "ChronoForms handle my posted arrays:" to 'Yes' on the Form General tab, that usually sorts out check-box problems.
Bob
I'm not sure why your checkbox code doesn't work. Try setting "ChronoForms handle my posted arrays:" to 'Yes' on the Form General tab, that usually sorts out check-box problems.
Bob
Ok, well I checked my setting for "ChronoForms handle my posted arrays:", and it was already set to "Yes". So I thought I'd try changing it to "No", and now my checkbox information gets displayed when using the implode. The foreach loops works too.
However, I had another checkbox on the page with only one option. If you only have one checkbox and the user doesn't mark it, or multiple and they don't mark any, then you will get a warning on the page like this...
Warning: implode() [function.implode]: Invalid arguments passed in /home/testing/public_html/components/com_chronocontact/libraries/customcode.php(51) : eval()'d code on line 94
However, I had another checkbox on the page with only one option. If you only have one checkbox and the user doesn't mark it, or multiple and they don't mark any, then you will get a warning on the page like this...
Warning: implode() [function.implode]: Invalid arguments passed in /home/testing/public_html/components/com_chronocontact/libraries/customcode.php(51) : eval()'d code on line 94
This topic is locked and no more replies can be posted.