Click to See Complete Forum and Search --> : Lightbox and Email Form Solutions


jeff6605
11-01-2007, 11:23 AM
I am looking for a solution to have a modal window contain a form that will email the data to the site owner when a client inserts the information and clicks submit.

I think lightbox gone wild will be a good choice for the modal window because it allows the use of forms when active.

I am trying to find the right email form to use with it. The form must be of a certain nature to not refresh when returning data errors (or the modal window will close).

Does anyone have any info on this type of solution. Thanks for any leads!

dtm32236
11-01-2007, 01:11 PM
using the lightbox for an email form isn't very standard - and it seems like your going to go through a lot more trouble to get this to work.

what's wrong with sticking to the expected standard and have the form on a normal page?

jeff6605
11-01-2007, 01:27 PM
Very true, it seems like I am always putting myself through more trouble than I need. My main intention is to try out new technologies. I like the look of the modal window. I also think it would be a great way for a contact us box to pop up. It grays out the background focusing the user on entering the requested information.

Here is an example of what I am trying to do (click promptly in the contact box). I have experimented with a javascript version, the only problem is that if a user enters information and returns errors, it closes the modal and takes the user to the regular HTML page. Trying to keep the user in the modal until the user either closes the window or sends the email. The form is not styled yet.

http://clearyourpath.landisdesign.com/

TJ111
11-01-2007, 01:35 PM
Have it "return false;". For example, give the form an onsumbit event handler.


<form method="post" action"email.php" onsubmit="return myFunction()">


So if the function returns false, the form wont be submitted.

jeff6605
11-01-2007, 02:25 PM
Have it "return false;". For example, give the form an onsumbit event handler.


<form method="post" action"email.php" onsubmit="return myFunction()">


So if the function returns false, the form wont be submitted.

Where exactly do you think I should place this code. The form works off a php include. You might know it as the popular formailer.php file.

TJ111
11-01-2007, 02:27 PM
Go put it in the formailer.php file.

jeff6605
11-01-2007, 03:49 PM
Go put it in the formailer.php file.

I am trying your suggestion. I have placed your code in various parts of the formailer.php file. I only get a parsing error which states the line it errored out on. It is the line that the code is placed. It is active on http://clearyourpath.landisdesign.com/ if you want to see what it is doing.

TJ111
11-01-2007, 04:01 PM
You probably have a line not followed by a semi-colon. Check the lines above 960 and see if anything you added might not be closed or ended properly.

jeff6605
11-01-2007, 04:27 PM
You probably have a line not followed by a semi-colon. Check the lines above 960 and see if anything you added might not be closed or ended properly.

Well I put the code in the very bottom of the document. I copied some of the code for you to see. This is not all of it, there is a lot more above.
$t_out .= "</optgroup>";
}
$t_out .= '</select><br />';

break;

}
}

$t_out .= '<div class="fmspacer"><!-- --></div>';

$t_out .= '<div class="fmcredits"></div>';

$t_out .= '<div class="fmsubmit"><input name="form_submitted" type="submit" id="Submit" value="' . $msg_submit . '" /></div>';

$t_out .= '</form></div></div>';

}



echo $t_out;
<form method="post" action"email.php" onsubmit="return myFunction()">

?>