close ad
Databridge V2 with MySQLi support IS Now Available!
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Showing a div after form submits successfully

Thread began 11/01/2009 12:51 am by gwh362692 | Last modified 11/10/2009 9:40 pm by troyd | 5795 views | 9 replies |

gwh362692

Showing a div after form submits successfully

Hi everyone,

In the Universal Email wizard you can set a goto page where it redirects to once the form is submitted successfully. Instead of this, I wanted to just show a box (ie. div#confirm) with a confirmation message. This would need to be hidden until the form was submitted and then shown after it was sent successfully.

Has anyone done this before and if yes, can you explain how I'd do it?

Appreciate any help.

Sign in to reply to this post

Jason ByrnesWebAssist

set the redirect page to go to the same page universal email is on and pass querystring variable:

page.php?sent=true


then put a PHP if statement around the confirm div:
<?php if(isset($_GET['sent']) && $_GET['sent'] == "true") { ?>
<div class="confirm">Your message</div>
<?php } ?>

Sign in to reply to this post

gwh362692

Thanks for the reply,

So I set the go to page to contact.php then clicked the lightning icon to go into the select data bindings dialogue. I'm not sure though how to pass the querystring variable you mentioned. The following code is in the code field:

<?php echo((isset($_POST[""]))?$_POST[""]:"") ?>

Do I go:

<?php echo((isset($_POST["page.php?sent=true"]))?$_POST[""]:"") ?>

Sorry, still trying to learn php syntax.

Sign in to reply to this post

Jason ByrnesWebAssist

No, just set the redirect to:
contact.php?sent=true

Sign in to reply to this post

gwh362692

Thanks - everything's working now.

Sign in to reply to this post

troyd

Jason,

If I wanted to also add the person's name what would I include in order to echo that which was entered into the text field?

I have "Thank You" now in the show if statement. I would like to include their name. I've tried several things but it's not catching it.

Oh and hide the form at the same time.

Thanks,
TroyD

Sign in to reply to this post

Jason ByrnesWebAssist

If the form element they enter their name is "name", set the message to:

php:
Thank You <?php echo((isset($_POST["name"]))?$_POST["name"]:""?>





To hide the form, place an if statement around it:


php:
<?php if(!isset($_GET['sent']) || (isset($_GET['sent']) &&  $_GET['sent'] != "true")) { ?>

<from...>
......
</from>
<?php ?>
Sign in to reply to this post

troyd

Yes, that first one is what I have been trying. My field name is "fieldset_group_Name"
So my entire show if is

php:
<?php if(isset($_GET['sent']) && $_GET['sent'] == "true") { ?>

<div class="confirm">Thank You<?php echo((isset($_POST["fieldset_group_Name"]))?$_POST["fieldset_group_Name"]:""?><br />
We will reply shortly. </div>
<?php ?>



But I'm not getting a result. It does show "Thank You, We will reply shortly".I must have something else wrong.

The hide form worked great however.

Thanks,
TroyD

Sign in to reply to this post

Jason ByrnesWebAssist

Oh, right, the redirect is killing the POST collection.


set the redirect to:

php:
contact.php?sent=true&email=<?php echo((isset($_POST["fieldset_group_Name"]))?$_POST["fieldset_group_Name"]:""?>



This way the posted email address is captured into the get collection.

then set the display to:
<?php if(isset($_GET['sent']) && $_GET['sent'] == "true") { ?>
<div class="confirm">Thank You<?php echo((isset($_GET["email"]))?$_GET["email"]:"") ?><br />
We will reply shortly. </div>
<?php } ?>

Sign in to reply to this post

troyd

Jason,

That did the trick. Thanks.
I can't wait until I can see these things for myself. Until then, I'm glad I have help here.

TroyD

Sign in to reply to this post
loading

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...