Forums  

Go Back   Forums > Talk > General FPP Discussion

Reply
 
Thread Tools Display Modes
  #1  
Old 10-15-2008, 04:49 PM
Henry Stuart Henry Stuart is offline
Junior Member
 
Join Date: Jun 2007
Posts: 25
Downloads: 0
Uploads: 0
Default Inserting a form in a Virtual Tour

Is there a way to insert a form that pops up during a virtual tour to allow customers to fill in information? This would mean they would not have to look down to the rest of the page under the tour to put information in a form.

I want to catch them when they are most involved with playing with the tour...

So basically can you embed an HTML page in any way in to the tour?

Many thanks,

Henry
Reply With Quote
  #2  
Old 10-15-2008, 06:27 PM
nidrig nidrig is offline
Senior Member
 
Join Date: Sep 2007
Location: Switzerland
Posts: 148
Downloads: 1
Uploads: 0
Default

hello,

I can see two solutions to insert a form within fpp, it all depends on the technology you'll be using to write your contact form.

- the simpliest: use a flash contact form with a php backend. The form can be inserted as a hotspot
- the smarter: use a javascript popup that embed (understand link to an html page) your already existing contact form. Look at this thread for a how-to: http://flashpanoramas.com/forum/showthread.php?t=1811 This method won't work in full screen.

good luck!
Reply With Quote
  #3  
Old 10-15-2008, 07:18 PM
jomla jomla is offline
Junior Member
 
Join Date: Jul 2007
Posts: 29
Downloads: 0
Uploads: 0
Default

Hi,

can you provide an example of Flash contact form (with PHP) which works with FPP? I've been trying to do such, however, I find contact form conflicts with FPP (I guess it's referencing issue ie. _root). If you had any luck with it, please provide the link to example or Flash/PHP code.


Thanks
Reply With Quote
  #4  
Old 10-16-2008, 02:09 PM
Henry Stuart Henry Stuart is offline
Junior Member
 
Join Date: Jun 2007
Posts: 25
Downloads: 0
Uploads: 0
Default

Firstly Nidrig thanks for the reply. I really want this to work fullscreen so I've gone down the flash route.

I'm having the same problem as Jomla though. I have made a flash form that links to PHP and sends an email (it's a small SWF file). However when I put this in my tour it does not send the email...

Does anyone know what I can do about this???

Last edited by Henry Stuart; 10-16-2008 at 02:14 PM.
Reply With Quote
  #5  
Old 10-16-2008, 05:26 PM
jomla jomla is offline
Junior Member
 
Join Date: Jul 2007
Posts: 29
Downloads: 0
Uploads: 0
Default

Hi,

you did test it online right? Otherwise (when tested offline), form won't work anyway unless you have PHP environment installed. Please, let us know.
Reply With Quote
  #6  
Old 10-16-2008, 07:54 PM
nidrig nidrig is offline
Senior Member
 
Join Date: Sep 2007
Location: Switzerland
Posts: 148
Downloads: 1
Uploads: 0
Default

hi,

Does any of you have working Flash contact form? If so, is that form working on a remote server (out of fpp)? (aka the mails are actually sent)

If so, could someone mail me or post the source code? I would gladly have a look.

cu
Reply With Quote
  #7  
Old 10-17-2008, 12:25 PM
Henry Stuart Henry Stuart is offline
Junior Member
 
Join Date: Jun 2007
Posts: 25
Downloads: 0
Uploads: 0
Default

Hi Guys,

Yes it works outside of FPP (i.e.mails are sent) but not inside (mails are then not sent - the send button appears not to respond). Here is the link to my form: http://www.sphericalimages.com/yorkm.../php_email.swf

And here is the link to the tour it is temporarily in for the purposes of this thread: http://www.sphericalimages.com/yorkminster/

The flash buttons in the form work but when you press to send it does not even move on to the next 'frame' as it does outside the tour. Feel free to test and send me email as you are trying...

Here is the code I am using to put the hotspot in the tour (and this is all there is relating to it in the xml):

<spot id="php_email" url="php_email.swf" visible="1"
static="1" depth="103" staticY="0" onOver="" onOut=""
/>

The send button in the flash file has the following action script:
on (release) {
form.loadVariables("email.php", "POST");
}

The email PHP is as follows:
<?php

$sendTo = "henry@sphericalimages.com";
$subject = "From a Tour";

$headers = "From: " . $_POST["firstName"] ." ". $_POST["lastname"] . "<" . $_POST["email"] .">\r\n";

$headers .= "Reply-To: " . $_POST["email"] . "\r\n";

$headers .= "Return-path: " . $_POST["email"];

$message = $_POST["message"];

mail($sendTo, $subject, $message, $headers);

?>
Reply With Quote
  #8  
Old 10-17-2008, 03:10 PM
nidrig nidrig is offline
Senior Member
 
Join Date: Sep 2007
Location: Switzerland
Posts: 148
Downloads: 1
Uploads: 0
Default

hi Henry,

Try the following:

Code:
<spot id="php_email" url="php_email.swf?file=email.php" visible="1"
static="1" depth="103" staticY="0" onOver="" onOut="" blockMouse="1"
/>
in the fla:

Code:
on (release) {
     if (_root.file != null) {
             form.loadVariables(_root.file, "POST");
     }
     else {
             form.loadVariables("email.php", "POST");
     }
}
Do you use Flash tracer? if so, it would be an assest to have the stack.

Tell me if it solved something!
Reply With Quote
  #9  
Old 10-17-2008, 03:48 PM
Henry Stuart Henry Stuart is offline
Junior Member
 
Join Date: Jun 2007
Posts: 25
Downloads: 0
Uploads: 0
Default

Hi Nidrig,

I tried your suggestions, it's uploaded at the moment, no change - still not working

Any other ideas?
Reply With Quote
  #10  
Old 10-17-2008, 04:13 PM
nidrig nidrig is offline
Senior Member
 
Join Date: Sep 2007
Location: Switzerland
Posts: 148
Downloads: 1
Uploads: 0
Default

Hi,

I have a contact form working within my own fpp, but it's in as3. I wonder if yours, being written in as2, might cause troubles.

In my XML file, I used an absolute path for the contact.php (ie: http://mydomain.com/contact.php), try this to see if there's any changes.

If not..

Try this form (free and in as3): http://www.scotflash.co.uk/blog/?p=13

In the .fla, open the "mc" movie clip and modify the following line that way:

Code:
var req:URLRequest = new URLRequest("contact.php");
to

Code:
var req:URLRequest;
if (loaderInfo.parameters.file != null) {
   req = new URLRequest(loaderInfo.parameters.file);
}
else {
   req =  new URLRequest("contact.php");
}
Tell me if there's any improvements.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT. The time now is 01:05 PM.


Powered by vBulletin® Version 3.7.1
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.