Important announcements from CouchCMS team
148 posts Page 12 of 15
Previous 1 ... 9, 10, 11, 12, 13, 14, 15 Next
Is it possible to keep members logged in even if the browser is closed? Like facebook.
That is what the 'Remember me' checkbox is for (as demonstrated by the sample 'login.php' template -
Code: Select all
<!-- if 'remember me' function is not required, the following checkbox can be omitted -->
<cms:input type='checkbox' name="member_remember" opt_values='Remember me=1' /> <br/>

Have to tried it?
I missed that checkbox big time. Sorry for dumb question. :shock:
tim wrote: Hi BlueCaret. These last two are easy. On your form you are using type='text'. But this is a data-bound form. All form fields should be type='bound'.


Hi Tim,

I tried setting all the form fields to type='bound' and then I got an error about the form not being a data-bound form so I added masterpage='members/index.php' mode='create' to the form tag but now I am still getting the same issue where the fields are filled in but I'm being told that they are empty. Any ideas?
I tried setting all the form fields to type='bound' and then I got an error about the form not being a data-bound form so I added masterpage='members/index.php' mode='create' to the form tag but now I am still getting the same issue where the fields are filled in but I'm being told that they are empty. Any ideas?

BlueCaret,
I apologize for leading you down the garden path. I clearly had no idea what I was talking about. What I would try in your position is to first go back to your original form. Forget about all the data-bound form stuff. Now remove the validation on the form, but keep it (or place it) in your members/index.php template.

According to the usage instructions at the very beginning of this thread, the cms:member_process_registration_form tag "works much like a databound-form." In a data-bound form the validation is placed in the editable region, not in the input tag.

If that doesn't work, hopefully KK or someone else more qualified will step in and sort things out.

Sorry again for the poor guidance. I use the newer extended-users module myself and it does use actual data-bound forms. I guess that's just what I saw when I looked at your code. I hope this new suggestion is more helpful to you.
Tim
Thanks for trying anyway Tim, I appreciate the help!

Unfortunately that just brings me back to where I was before, same issue. Anyone else have any ideas? It's got to be something simple I'm sure..
Could you post the issue and code in a new thread @BlueCaret?
cheesypoof wrote: Could you post the issue and code in a new thread @BlueCaret?


Sure thing. If anyone else wants to follow along, the new thread for this issue is at viewtopic.php?f=4&t=9020

Thanks
I would like to use my own styling for the forms, how exactly would I do that?
Code: Select all
<cms:if k_member_logged_in>
                                 <!-- If user is logged in -->
                                 <a href="<cms:member_logout_link />">logout</a>
                                    <cms:else />
                                    <cms:form method="post" anchor='0'>
                                       <cms:if k_success >
                                          <cms:member_process_login_form />
                                       </cms:if>
                                       <cms:if k_error >
                                          <h3><font color='red'>
                                             <cms:show k_error />
                                             </font></h3>
                                       </cms:if>
                                       Username (your email): <br/>
                                       <cms:input type='text' name='member_name' class='form-control' />
                                       <br/>
                                       Password: <br />
                                       <cms:input type='password' name='member_password' class='form-control' />
                                       <br/>
                                       
                                       <!-- if 'remember me' function is not required, the following checkbox can be omitted -->
                                       <cms:input type='checkbox' name="member_remember" opt_values='Remember me=1' />
                                       <br/>
                                       <input type="submit" value="Login" name="submit"/>
                                    </cms:form>
                                 </cms:if>

That's the member module form.
This is the form I'd like to use:
Code: Select all
<form class="form-inline" role="form">
                                       <div class="input-group margin-bottom-sm"> <span class="input-group-addon"><i class="fa fa-envelope-o fa-fw"></i></span>
                                          <input class="form-control" type="text" placeholder="Email/Username" style="width:auto;">
                                       </div>
                                       <div class="input-group"> <span class="input-group-addon"><i class="fa fa-key fa-fw"></i></span>
                                          <input class="form-control" type="password" placeholder="Password" style="width:auto;">
                                       </div>
                                       <div class="checkbox">
                                          <label>
                                             <input type="checkbox" style="width:auto;">
                                             Remember me</label>
                                       </div>
                                       <br>
                                       <button type="submit" class="btn btn-sm btn-default" style="margin-top: 3px; width: 100%;">Login</button>
                                       <a href="#">
                                       <center>
                                          Forgot Password?
                                       </center>
                                       </a>
                                       <hr>
                                       <button type="submit" class="btn btn-sm btn-default" style="width: 100%">Register</button>
                                    </form>
Hey theAwesomer! This should be pretty easy. You're expected to customize the forms to suit your needs. Take a look at the forms documentation for how to convert ordinary HTML forms to Couch forms. http://www.couchcms.com/docs/concepts/forms.html

Basically you just put cms: in front of everything. Things like classes you simply add to your cms:input tags just like you would for a normal form.

For example:
Code: Select all
<form class="form-inline" role="form">
becomes
Code: Select all
<cms:form class="form-inline" role="form">

Change
Code: Select all
<input class="form-control" type="text" placeholder="Email/Username" style="width:auto;">
to
Code: Select all
<cms:input type="text" name='member_name' class="form-control" placeholder="Email/Username" style="width:auto;" />


Don't forget to use the name attribute. Couch needs that to process the form. You'll also need to include the if statements that check for login and the the k_success and k_error statements for processing the form.

Give it a try and get back to us if you run into trouble with any of the details.
The account creation and password reset process involves automated email sending to registrants/members. Is it possible to change the sent emails Title, email address, email body content?
Thanks!
Previous 1 ... 9, 10, 11, 12, 13, 14, 15 Next
148 posts Page 12 of 15