Login     Sign up
Paul Raspa (@paulraspa)
88 months ago
1150 Views

I am using a CMS in addition to jCow. I want to embed a jCow login form on the home page of the CMS. When I replicate the fields and naming on the jCow login page, it allows the user to login, but then sends them to an error message. Is there a hidden value or param that the login form is looking for?

Here is my form code: (jCow is installed at /z/index.php)

<form method="post" name="form1" class="ajaxform" action="http://zonk.buzz/z/index.php?p=member/loginpost" >
<p>Already a member?</p>
<input type="text" size="10" name="username" autocorrect="off" autocapitalize="off" class="form-control" value=""  placeholder="Username or Email"/> 
<input type="password" size="10" class="form-control" name="password" value="" placeholder="Password" /><br>
<div class="checkbox"><label><input type="checkbox" name="remember_me" id="remember_me" value="1"  /> Remember me</label></div>
<div class="form-group"><button type="submit" class="btn btn-lg btn-primary">Login</button></div>
</form>

http://zonk.buzz/z/index.php?p=member/loginpost generates the following error response:

{"url":"http:\/\/zonk.buzz\/z\/index.php?p=feed","act":"redirect"}

I get a similar result when I create a custom sign-up form (because I want to change the wording and layout to suit my audience).

{"url":"http:\/\/zonk.buzz\/z\/index.php?p=account\/avatar","act":"redirect"}
1 people followed this question
0

it seems that Login is success, you get the some data by json.
You need to add some code in order to understand the feedback data by json.

You should refer to common.js. There is $(document).on("submit",".ajaxform",function() {, this javascript recognizes the feedback data from form tag with 'class="ajaxform"'. I think you add this javascript part to add your CMS.

foken @shigeru
88 months ago