Hi.
I had the same problem :
a weblogin "simple" in the header of the site (for login)
and an other weblogin "register" on a page.
Submitting
the register didn’t work because weblogin in the header interfered
(putting the weblogin "simple" code lower than "register" in the html page didn’t help).
The Phpx solution didn’t work for me aswell.
My workaround is to use Personalize instead of webloginpe for the login header. And that works
along with webloginpe to handle all the rest :
■ In login header :
[!Personalize? &yesChunk=`LoginSuccessTpl` &noChunk=`LoginFormTpl` &ph=`user.username`!]
■ LoginFormTpl as the default one but without the [~[*id*]~] :
<div id="wlpeLogin">
<form id="wlpeLoginForm" action="[~18~]" method="POST">
...
(Where 18 is the id of my register page)
■ LoginSuccessTpl :
<div id="wlpeUserLogged">
<div id="wlpeUserInfo">
Bienvenue <a href="[~20~]">[+user.username+]</a>
<form id="wlpeUserForm" action="[~18~]" method="POST">
<button type="submit" id="wlpeLogoutButton" name="service" value="logout">Déconnexion</button>
</form>
</div>
</div>
(Where 20 is the Profile page and 18 the Register page (in fact it’s a "simple" weblogin))
■ The register page (id=18) :
[!WebLoginPE? &lang=`fr` &type=`simple` ®Type=`instant` &groups=`clients` ®Required=`username,password,fullname,email,phone,comment,tos,captcha` ®SuccessId=`2` &messageTpl=`MessageTpl` &loginFormTpl=`LoginFormTpl` &successTpl=`LoginSuccessTpl` &resetTpl=`ResetTpl` &liHomeId=`2` &loHomeId=`2` ®isterTpl=`RegisterInstantFormTpl` ®isterSuccessTpl=`RegisterSuccessTpl` &tosChunk=`TosChunk` ¬ifyTpl=`NotifyTpl` ¬ifySubject=`NotifySubject` ¬ify=`[email protected]`!]
(It’s no longer a "register" webloginpe but a "simple" because it now handles all operations except the Profile view that is on the page 20)
■ RegisterTpl is the normal one, with
action="[~[*id*]~]"
So : the login and "Register me" operation (clicked in the header) are redirected to the register page (18)
because of the
action="[~18~]" in the LoginFormTpl.
That works great.
The only problem is that it seems the referer redirection don’t work. If I don’t set
&liHomeId=`2` &loHomeId=`2` it stays on the Register page after login.
Feel free to ask question if you need more details.
And sorry if my english is not really fluent.
EDIT1 : Actually that doesn’t works very well on Internet Explorer. It’s weird because it’s not a client feature.
When clicking a header button (Sign-In or Sign-Up) :
■ On Firefox : it redirects on the webloginpe page (the "simple" on) and it execute the Service (so it log you in or it print the registration page.
■ On IE : it redirects but DOESN’T execute the Service. To works the webloginpe page have to be open when sending the Service request from the header : it kills the purpose of a satelite login form.
[b]EDIT2 : Found a workaroud ! IE drive me mad.(/b]
The problem comes from <button>. I had to change the buttons to <input type="submit">, that that works.
The change is only needed in the header login (the with [!Personalize I recall).
So you have to change :
<button type="submit" id="wlpeLoginButton" class="formbutton" name="service" value="login">Log-in</button>
TO
<input type="image" id="wlpeLoginButtonHead" class="formbutton" src="loginForm.png" name="service" value="login" title="Log-in" alt="Log-in" />
And his little <button> brothers too. (Notice type="image" and not "submit").
EDIT3 : It’s seems that this solution doesn’t work every time. Here is my second workaround :
■ In the login form (in the header) replace every <button> by a <a> equivalent (except for the "login" button) :
<a id="wlpeReminderButtonHead" href="[~18~]?service=forgot" class="formbutton" >Forgot my password</a>
■ For the "login" button (we can’t send login/pass through GET paramaters) : I let the normal <button> and I add this in the form :
<input type="hidden" name="service" value="login" />
So, by default, the service is "login". Others <a> button override that.