Developer forum

Forum » CMS - Standard features » Validate login form version 8.2.1.0

Validate login form version 8.2.1.0

Martin Skov Nielsen
Reply

Hi!

I need to validate a login form in this version... It doesn't seem that <!--@Server:Request.Username--> is parsed? So how would you guys display an error message on postback??


Replies

 
Imar Spaanjaars Dynamicweb Employee
Imar Spaanjaars
Reply

Query string keys are always lower case, so maybe <!--@Server:Request.username--> gives you what you need?

Imar

 
Martin Skov Nielsen
Reply

Well it gives me what I need when it's entered. But I'm trying to get a "not" version...

And can't update the version because of some integration project that would break if Idid...

    <!--@If Not(Server:Request.username = "")>
<!--@If Not(Server:Request.password = "")>
<!--@If(Global:Extranet.UserID == 0)-->
    <script type="text/javascript">
    $(document).ready(function(){
        $('.login-error').css('display', 'block');
    });
    </script>
    <!--@EndIf--><!--@EndIf--><!--@EndIf-->

So I can't use <contains> and I can't use && either... If the value isn't entered I don't get "" I get <!--@Server:Request.username--> (if I try to output it)....

 
Morten Bengtson
Reply
Try using if defined... http://templates.dynamicweb-cms.com/TemplateTags/Dynamicweb-template-tags/General-tags/If-Defined.aspx

 

You must be logged in to post in the forum