| Post |
|
Berend Raap - Guest
2:10 pm - May 27, 2008
|
| |
|
Please replace the ??? with your data!
- Your URL: http://alphatrots.nl
- The browser used: ie 6.0 FF
- cforms version: 8.4
- Your Wordpress version: 2.5
[desc]: _ Hi,
Is it possible to retrieve the field values, do some simple math on it and ddisplay the results on a ddifferent page?
For example:
FORM:
items sold: 10
price: 20
RESULT page
Your sales amount to 200
I think this must be possible with cforms but, call me stupid, I can't find out how. Tracking of results are not needed and also email notifcation is not needed. Results are only for visitor and can be dismissed later.
cheers, Berend
|
|
|
Oliver
- Admin
7:51 pm - May 27, 2008
posts 3553 |
| |
|
cforms is a form mailer, so the original intention is to only email the form data.
With that said, you can use the custom function: my_cforms_filter & my_cforms_ajax_filter to manipulate any form field.
Add a few empty hidden field containers (to store results) and simply create your own success message that references these containers and the other fields...
(see the HELP! page re: hidden fields and custom variables)
|
|
|
Berend Raap - Guest
1:33 pm - May 29, 2008
|
| |
|
Hi Oliver,
Do you have some examples on how to do this?? I have tried to use the functions in a special template but then the functions where unknown. When declaring the function in the functions.php of my theme the error message disappeared but that messed up the wp dashboard. Also I did not manage to get results from the functions. I am sure that I do something wrong so some examples would really help.
Cheers, Berend
|
|
|
Oliver
- Admin
6:52 pm - May 29, 2008
posts 3553 |
| |
|
The above mentioned functions are already in cforms/my-functions.php with examples. Simply adjust to your needs.
To use them, you need to un-comment the code. If you're unsure about what those data arrays hold, use the mail() example (included) to send yourself the contents of these arrays...
You can now modify the specific array data fields and return these to cforms.
|
|
|
Berend Raap - Guest
9:04 am - June 3, 2008
|
| |
|
Thank you, I was thinking far too difficult. Could not believe it would be that easy. T
|
|
|
Kyle - Guest
9:34 pm - September 19, 2008
|
| |
|
Is it possible to use the myfunctions functions to do extra validation. I am using cforms to do credit card processing. I want to use the my_cforms_filter function to send information to a payment API and get the response.. That far I got working. However, If the API returns false, credit card denied, then I want to send them back to the form, to fix there mistake(s), but if its successful I want to process the form as normal. is this possible?
|
|
|
Oliver
- Admin
9:57 pm - September 20, 2008
posts 3553 |
| |
|
Is it possible to use the myfunctions functions to do extra validation.
no.
I want to use the my_cforms_filter function to send information to a payment API and get the response.. That far I got working. However, If the API returns false, credit card denied, then I want
that you can do, but as far as the form is concerned, it's submitted and accepted.
|
|