| Post |
|
New Member | Tibor posts 3 11:39 am April 24, 2009
| |
|
|
First of all: Oliver, thank you for this great plugin! I hope you can help me with a burning question though…
What I need to accomplish:
- user fills in a subscription form (for newsletter)
- forms is added to db, with an extra (hidden) field: confirmed=false
- user gets email with a link with some added variable(s) to confirm the subscription
- clicking the link will take user to a 'thank you for subscribing' page, and field confirmed of this user is set to 'true'
What would be the way to go?
Thanks in advance!
|
|
|
Admin
| Oliver Munich, Germany posts 6237 8:45 am April 25, 2009
| |
|
|
it's possible but requires
- using my-functions.php to generate a custom/dynamic autoconf email with a link
- your own PHP skills to write a small PHP routine to accept the user link and set the hidden value to "true"
re: 1)
easy: search for $setting == "autoConfTXT" make it its own IF block and adjust/rewrite (&return !) the new message to send it out to the user.
re: 2)
a bit more difficult: you need to dissect the parameterized URL (URL?trackingID=NNN&val1=123&val2=456…etc) and if it is a legit request send off a SQL statement to adjust the value in the cforms tracking tables.
"trackingID" is important to pass on, so you can reference the tracked entry in the cforms tables.
|
|
|
|
|
New Member | Tibor posts 3 12:07 pm April 28, 2009
| |
|
|
Thanks for the quick reply -and sorry for my late reaction…
I've chosen to go for another solution concerning the newsletter, using PHPlist to handle the confirmation stuff and list management.
Now trying to figure out how to use CForms to send the subscription form to PHPlist…If you happen to know how to do this…
|
|
|
Member | jorrie posts 11 9:52 pm April 28, 2009
| |
|
|
Could you please clarify this in more depth please?
Could anyone provide an example if block with a rewrite for this? Is it possible to use an external HTML file with %var% fields to replace those? (and if so, how would one do that?)
The Re:2 i can do, just the 1st is a bit of the problem
|
|
|
New Member | Tibor posts 3 10:27 pm April 28, 2009
| |
|
|
As a matter of fact, I'm also still interested how to use my-functions.php to accomplish the first part.
I think it would be nice to have some more code examples (maybe from the user community?) of what's possible with my-functions.php in general.
|
|
|
Admin
| Oliver Munich, Germany posts 6237 9:54 pm April 28, 2009
| |
|
|
I thought it was obvious from the post above:
- using my-functions.php to generate a custom/dynamic autoconf email with a link
re 1:
search for $setting == "autoConfTXT" make it its own IF block and adjust/rewrite (&return !) the new message to send it out to the user.
my-functions.php comes with plenty of examples per routine/logic element, make sure to look at the complete file, uncomment areas needed and modify the code respectively.
This will require PHP skills.
|
|
|
|
|
Member | jorrie posts 11 7:11 pm May 1, 2009
| |
|
|
Would it be possible to say:
if( $cformsdata['data']['frmusername']=='test') {
//return custom error message here and bring user back to the form.. }
Thus, set an error message and print it back?
I digged into the my-functions.php and it works wonderfull so far..
I would like to validate some fields with custom logic in my-funtions.php and throw back errors to the forum, making the user modificate untill he can resend, untill the form is 100% error free..
any quick example of this oliver or anyone else? thanks!
|
|
|
Admin
| Oliver Munich, Germany posts 6237 12:52 pm May 3, 2009
| |
|
|
no, as I stated in the other thread, my-functions.php doesn't support any user driven custom form validation.
|
|
|
|