I've trawled the support pages for help with the following issue but found no solution.
My objective:
I'm creating a quotation form on a website for a printing company. Part of the quotation form would require users to enter their contact details but this element would be negated if they were already registered users. Therefore I need to conditionally display the login/register form at the head of the quotation form if the user is not logged in. Then of course once logged in the login form clears only to reveal the remainder of the quotation form.
I have looked at logingtabogan but it is not as extensive as I require and I have also looked at rules but no joy either.
Does anyone know if this is achievable or if my expectations are too high. I gather this is a weakness in drupal.
Comments
try this
http://drupal.org/project/login_destination
Thanks -That solves the second part
I can now re-direct back to the quote form but still need to have the login form appear on the quote form node or in a separate block which I can define to only show to anonymous users on that page. If I could achieve this I will also need to get rid of the "You must login or register to view this form." message. If there is a clean way to clear this the please let me know, otherwise I'll fudge it with CSS to display: none;
Thanks again
my solution to the problem
my solution to the problem has been to include the following code in my node-edit.tpl.php file:
if (user_is_logged_in()==FALSE){print 'message i want users to see about logging in'; print l('Login', 'user');}
Basically - if the user isn't logged in, then they see a message about logging in.
This fits what i want.
Else - you can use the inline registraion module to force users to login after submitting the form: http://drupal.org/project/inline_registration
or the rules module: http://drupal.org/project/rules
regards
Sylvia