Anonymous user triggers event
Last Post 03-15-2007 08:40 AM by Chad Nash. 1 Replies.
AddThis - Bookmarking and Sharing Button
Author Messages
Jerry BeachUser is Offline
going with the flow
going with the flow
Posts:40
Avatar

--
03-13-2007 10:23 AM

    We use a questionaire right when a user registers, before they validate their email address, so we can gather some useful information while their confirmation email arrives. Pass some values from dynamic registration over to the form...works great!

    Just wondering how to add an enhancement. We'd like to have a checkbox "[  ] Send to mgt committee" which would deterimine whether an email gets sent, or not, when they save the form. No problem here.

    The problem comes when I try to hide that question from anonymous users. I'd like to have anonymous users NOT see the question and for the email ALWAYS be sent when it is an anonymous user. Can't quite figure a way to do this as 'hidden from anonymous' results in an empty field rather than True/False and so it doesn't trigger the form event.

    Is there another way to accomplish it? Basically, we want anonymous users always to trigger an email and for other users to have an option about whether to send it or not.

    Thanks,
    jb

    Chad NashUser is Offline
    Posts:5260
    Avatar

    --
    03-15-2007 08:40 AM
    Hmmmm. Yes if you hide a field by role or you hide a field from anonymous users that field will never get rendered. You would want to use a hidden field type. There are probably only a few ways of doing this though and they have not been tested yet.

    1. (curent release) Use a hidden field type and set the fields default value to be the DotNetNuke User Default of First Name. This way only send the email if the hidden field is empty. This should work because for anonymous users the field should be empty but for other users it should not be empty.

    2. (next release). You will have the ability to use SQL as a default value for a textbox or hidden field type along with some common tokens such as userID. With this SQL option for default value you could do something to maybe pass the UserID to a stored procedure which would then either return 'Yes' for anonymous or 'No' because the UserID was found. Or even something like just selecting the UserID and then set the event to fire if its -1 since thats what the UserID would return for anonymous users. This is probably an even better idea since you wouldn't have to use any other stored procedure or table etc...

    -Chad


    ---
  • film izle
  • 720 izle
  • film
  • sinema izle
  • film makinesi
  • T�rk�e dublaj film
  • film izle
  • film izle
  • baglan film izle
  • sinema izle
  • 1080 film izle
  • film mercegi