Links in WFB's Manual Server Setup...

User 2629835 Photo


Registered User
18 posts

I've been using WFB for over a month. I like the builder itself a lot, but the manual configuration has had me stumped since the beginning. I've yet to produce a form that populates mysql AND generates an email/confirmation page with the data that was input on the form. I feel that I'm very close to getting this to work flawlessly, but I'm just not there yet.

I stumbled over this post today, which has substantially different instructions for the manual server setup than I've been using (without much luck): http://www.coffeecup.com/help/articles/add-web-form-builder-to-third-party-app/?locale=en

versus what comes with the software:

http://www.coffeecup.com/help/articles/how-to-add-a-form-to-your-page/

Are the instructions provided in the first link still relevant?

If it is, then I've got 2 questions. First, my manual server export generates this:

<script type="text/javascript">document.write(unescape("%3Ciframe id=\"fb_iframe\" src=\"displaynotes.php" + window.location.search + "\" width=\"100%\" height=\"795\"allowtransparency=\"true\" scrolling=\"no\" frameborder=\"0\"%3E&lt;a href=\"displaynotes.php\" title=\"displaynotes\"&gt;Check out my CoffeeCup Form&lt;/a&gt;%3C/iframe%3E"));</script>
<noscript>
<iframe height="795" style="border:none; background:transparent; overflow:hidden; width:100%;"
id="fb_iframe" src="displaynotes/displaynotes.html">
&lt;a href="displaynotes.php" title="displaynotes"&gt;Check out my CoffeeCup
Form&lt;/a&gt;
</iframe>
</noscript>

The post I reference above has an html file in the first src= element. My code has a php file reference there. Does that matter? Also, should I be using html paths or windows paths in the code?

I can not open up my site to outsiders (it's an intranet site) :<

I'd be grateful for any pointers from this helpful forum community.

Thanks.
User 103173 Photo


VP of Software Development
0 posts

One of those articles are redundant. The one you should be following is this:

http://www.coffeecup.com/help/articles/ … your-page/

The markup you pasted is correct. That is exactly how it should look. Everything is in a relative path, so you do not have to change anything. If you do not want to use the PHP markup, just remove the <script></script> part.

For MySQL, did you go into the Settings > Saving Data Tab and correctly configure the settings? If you are using an internal server, you may want to look at your log files to see if there is any error being produced.

For Email, did you go into the Settings > Email Notices Tab and enter your email address in the TO field? If you are also using an internal server there, you may want to check your spam folder or mail.log file for any errors.

Using internal servers is a bit difficult for us to help debug. ;)
Learn the essentials with these quick tips for Responsive Site Designer, Responsive Email Designer, Foundation Framer, and the new Bootstrap Builder. You'll be making awesome, code-free responsive websites and newsletters like a boss.
User 2629835 Photo


Registered User
18 posts

Thanks for the response Scott. The article you reference is the one I was using. It points out that, for manual server setups, the paths in the script need to be altered, but the documentation is a bit unclear.

I would gladly set up a Webex and pay $200 (Amazon gift card) to someone for the 15-30 minutes of time it'll take you to show me how to set up a form on my server and get it configured to both write to mysql (I've done this, but not consistently) and have an email confirmation form sent with the values of the form in it.

One note, my configuration gets a little tricky because I pass variables to the form via a URL, but I've written the php necessary to trap those variables, populate them in the form, and have them written back to mysql.

Anyone with the expertise to help, email me at johncmunoz at gmail dot com. Replace the at with @ and the dot with . or reply to this post.

Thanks!

User 2629835 Photo


Registered User
18 posts

Update: I went back and watched Phil's very helpful video at http://www.screencast.com/t/m3IX2iKWA

After watching the video I realized I needed to:

A. Put the .php and my html file in my root web server directory. In my case, that htdocs.
B. Put the sub folder that is shown when you click the 'Open in Explorer' button into my root web folder. Somewhere along the way I read a post saying that the contents of that subfolder need to be extracted, not the folder itself. For me at least, this bit of guidance was wrong.
C. Comment out the <script></script> section of the 'paste' code box. Thanks Scott for that tip!

After doing all that and adjusting the user.cfg.php file, both the mysql and email updates are working fine. The last bit I need to do is the confirmation page. Following the advice given in the 'settings' tab in the WFB software, I'm redirecting the confirmation page to another url. Problem is that [_form_results_] shows up empty when I try to show the results.

Any pointers on how to preserve [_form_results_] when redirecting to another url?

Thanks.

User 187934 Photo


Senior Advisor
20,271 posts

The form builder uses $_SESSION's to pass the variables along. Their being unset in config.cls.php I think at about line 411.
I can't hear what I'm looking at.
It's easy to overlook something you're not looking for.

This is a site I built for my work.(RSD)
http://esmansgreenhouse.com
This is a site I built for use in my job.(HTML Editor)
https://pestlogbook.com
This is my personal site used for testing and as an easy way to share photos.(RLM imported to RSD)
https://ericrohloff.com
User 2629835 Photo


Registered User
18 posts

Hi Eric,

Turns out all I needed to do was to add: <?php session_start()?> to my pages.

Thanks for pointing me down the $_SESSION's path, that got me to where I needed to be.

I appreciate your help very much!
User 187934 Photo


Senior Advisor
20,271 posts

That has gotten me a few times. See signature.:lol:
I can't hear what I'm looking at.
It's easy to overlook something you're not looking for.

This is a site I built for my work.(RSD)
http://esmansgreenhouse.com
This is a site I built for use in my job.(HTML Editor)
https://pestlogbook.com
This is my personal site used for testing and as an easy way to share photos.(RLM imported to RSD)
https://ericrohloff.com
User 2629835 Photo


Registered User
18 posts

I spoke too soon. :(

If I add <?php session_start()?> to my pages and then add <?php echo '<pre>' . print_r($_SESSION, False) . '</pre>'; ?>
to my confirmation page I get back all the session variables and, below that, I get a nicely formatted confirmation page. See attached file. All I want to display is the confirmation page.

I've also attached the code I used to create the confirmation page. The .txt file is really .php, but the attach file utility doesn't allow .php files to be uploaded.

Appreciate your thoughts on this.

Thanks.
Attachments:
User 187934 Photo


Senior Advisor
20,271 posts

The best approach is to write your own myformname.php to process the data and pass the $_SESSION variables onto the confirmation page. This way your not hacking a bunch of code and wondering why it doesn't work. Another option is add input elements to your form that you want to get populated by the $_GET and use css or JQuery to keep them hidden. If your keeping the built in myformname.php then all variables that need to be submitted have to be added to the form through the app it's self.
I can't hear what I'm looking at.
It's easy to overlook something you're not looking for.

This is a site I built for my work.(RSD)
http://esmansgreenhouse.com
This is a site I built for use in my job.(HTML Editor)
https://pestlogbook.com
This is my personal site used for testing and as an easy way to share photos.(RLM imported to RSD)
https://ericrohloff.com
User 2629835 Photo


Registered User
18 posts

Thanks again Eric. I'm trying to code something to capture each variable, but it's slow going.

Here's what I don't get. When I echo '<pre>' . print_r($_SESSION, False) . '</pre>'; I see the actual output that's generated in the email confirmation page, and that I expected to be captured in [_form_results_] on my confirmation page. But when I do print_r, I get a bunch of stuff I don't want to display to my users. Is there a way to parse off and display just the pretty part?

I find setting up the confirmation page difficult, perhaps the problems are b/c I'm doing a redirect? The redirect option was suggested in the WFB interface.

And, why does this work in email:
"notification_message" :
{
"bcc" : "",
"cc" : "",
"custom" :
{
"body" : "<!DOCTYPE html>\n<html dir=\"ltr\" lang=\"en\">\n<head><title>You got mail!</title></head>\n<body style=\"background-color: #f9f9f9; padding-left: 11%; padding-top: 7%; padding-right: 20px; max-width: 700px; font-family: Helvetica, Arial;\">\n<style type=\"text/css\">\nbody {background-color: #f9f9f9;padding-left: 11%; padding-top: 7%; padding-right: 2%;max-width:700px;font-family: Helvetica, Arial;}\np{font-size: 12px; color: #666666;}\nh1{font-size: 60px !important;color: #cccccc !important;margin:0px;}\nh2{font-size: 28px !important;color: #666666 ! important;margin: 0px; border-bottom: 1px dotted #00A2FF; padding-bottom:3px;}\ntable{width:80%;}\ntd {font-size: 12px !important; line-height: 30px;color: #666666 !important; margin: 0px;border-bottom: 1px solid #e9e9e9;}\ntd:first-child {font-size: 13px !important; font-weight:bold; color: #333 !important; vertical-align:text-top; min-width:10%; padding-right:5px;}\na:link {color:#666666; text-decoration:underline;} a:visited {color:#666666; text-decoration:none;} a:hover {color:#00A2FF;}\nb{font-weight: bold;}\n</style>\n<h1 style=\"font-size: 60px !important; color: #cccccc !important; margin: 0px;\">Hey there,</h1>\n<p style=\"font-size: 12px; color: #666666;\">\nSomeone filled out your form, and here's what they said:\n</p>\n<div>\n[_form_results_]\n<p style=\"font-size: 12px; color: #666666;\">\n</p>\n</div>\n</body>\n</html>\n",
"is_present" : true,
"subject" : "New Notes Submitted"
},
"from" : "jmunoz@blah.com",
"is_present" : true,
"replyto" : "",
"to" : "jmunoz@blah.com"

But this doesn't work:

"redirect_settings" :
{
"confirmpage" : "<!DOCTYPE html>\n<html dir=\"ltr\" lang=\"en\">\n<head>\n<title>Success!</title>\n<meta charset=\"utf-8\">\n<style type=\"text/css\">\nbody {background: #f9f9f9;padding-left: 11%;padding-top: 7%; padding-right: 2%;max-width:700px;font-family: Helvetica, Arial;}\ntable{width:80%;}\np{font-size: 16px;font-weight: bold;color: #666;}\nh1{font-size: 60px !important;color: #ccc !important;margin:0px;}\nh2{font-size: 28px !important;color: #666 !important;margin: 0px; border-bottom: 1px dotted #00A2FF; padding-bottom:3px;}\nh3{font-size: 16px; color: #a1a1a1; border-top: 1px dotted #00A2FF; padding-top:1.7%; font-weight: bold;}\nh3 span{color: #ccc;}\ntd {font-size: 12px !important; line-height: 30px; color: #666 !important; margin: 0px;border-bottom: 1px solid #e9e9e9;}\ntd:first-child {font-size: 13px !important; font-weight:bold; color: #333 !important; vertical-align:text-top; min-width:50%; padding-right:5px;}\na:link {color:#666; text-decoration:none;} a:visited {color:#666; text-decoration:none;} a:hover {color:#00A2FF;}\n</style>\n</head>\n<body>\n<h1>Thanks! </h1>\n<h2>The form is on its way.</h2>\n<p>Here&rsquo;s what was sent:</p>\n<div>[_form_results_]</div>\n<!-- link back to your Home Page -->\n<h3>Let&rsquo;s go <span> <a target=\"_blank\" href=\"http://www.coffeecup.com\">Back Home</a></span></h3>\n</body>\n</html>\n",
"gotopage" : "https://insighttest.newpennfinancial.com/note_conf.php",
"inline" : "<center>\n<style type=\"text/css\">\n#docContainer table {margin-top: 30px; margin-bottom: 30px; width:80%;}\n#docContainer td {font-size: 12px !important; line-height: 30px;color: #666666 !important; margin: 0px;border-bottom: 1px solid #e9e9e9;}\n#docContainer td:first-child {font-size: 13px !important; font-weight:bold; color: #333 !important; vertical-align:text-top; min-width:50%; padding-right:5px;}\n</style>\n[_form_results_]\n<h2>Thank you!</h2><br/>\n<p>Your form was successfully submitted. We received the information shown above.</p>\n</center>",
"type" : "gotopage"
},
"uid" : " ",
"validation_report" : "in_line"
},

Have something to add? We’d love to hear it!
You must have an account to participate. Please Sign In Here, then join the conversation.