close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Email depending on value in registration form

Thread began 4/22/2014 8:40 am by Mags | Last modified 4/22/2014 12:34 pm by Mags | 1407 views | 8 replies |

Mags

Email depending on value in registration form

I have built a user registration system using SecurityAssist which requires admin approval before the user can access the site. Everything's working great, but I have two admin people, one who gets emails letting them know when anyone registers, and the other who should only get an email if the "Member_Type" dropdown selection in the registration form is a specific value. I have two Universal Email behaviors set up, one for each Admin person, but currently the trigger is "any form post", so both admins get all registration emails. I see I can use a dynamic value but I'm not sure how to construct it. Basically I only want to send an email to the second admin person if the Membership_Type dropdown field in the form's value is "3", so would this be the correct syntax?

((isset($_POST["Membership_Type"]))?$_POST["Membership_Type"]:"3")

Thanks
Margaret

Sign in to reply to this post

Jason ByrnesWebAssist

the code for the trigger if statement would be:

if((isset($_POST["Membership_Type"])) && $_POST["Membership_Type"] == "3") {

Sign in to reply to this post

Mags

Hi Jason

It didn't work unfortunately - it stopped the registration page from loading (just got a blank page). I've put the FTP details in the PM section, could you maybe take a look for me?

Thanks
Margaret

Sign in to reply to this post

Jason ByrnesWebAssist

Sorry, there was a syntax error in the original code, the correct code should be:

if((isset($_POST["Membership_Type"])) && $_POST["Membership_Type"] == "3") {

Sign in to reply to this post

Mags

Hi Jason

It's still not working - getting a blank page when trying to load the registration page. Could you take a look?

Thanks
Margaret

Sign in to reply to this post

Jason ByrnesWebAssist

at line 255, you have:

if (((if((isset($_POST["Membership_Type"])) && $_POST["Membership_Type"] == "3") { != ""))) {

it should be:
if((isset($_POST["Membership_Type"])) && $_POST["Membership_Type"] == "3") {

Sign in to reply to this post

Mags

I've replaced that line and it's now working fine, thanks. I don't know why it was wrong though - I copied and pasted the code you gave me into the Universal Email Server Behavior Trigger dialog box so it must have got rewritten somehow.

Thanks again
Margaret

Sign in to reply to this post

Jason ByrnesWebAssist

you cant copy that code into the trigger box of the UE behavior. What you are asking for cannot be done in the behavior, it has t be done manually directly in the code.

Sign in to reply to this post

Mags

Ah, I didn't realise - all working now though, thanks!

Sign in to reply to this post

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...