The subject line pretty says what I am dealing with. I have created a custom registration page.
- I copied page.tpl.php, and uploaded the copy as page-user-register.tpl.php
- I went to Drupals out of the box registration page and pulled the source code
- Copied it exactly into the page-user-register page
It looks just like it, the password validation works correctly and i can create new accounts. If I fill out a user name that is taken or try to submit the form when it's not filled out completely; the page re-loads with all of the fields blank. I am wondering how I can get the standard Error messages and red highlights to let the user know whats going on.
Any help would be awesome,
Thanks,
Kris
Comments
You will want to avoid ever
You will want to avoid ever copying and pasting code from a source view on a page within Drupal. The dynamic possibilities within forms mean that the html output needs to be coming from within the system so that it can react to different user actions. This is why you are no longer getting error messages.
Rather than modifying page-user-register.tpl.php you will want to create a new function within your theme's template.php file. That allows you to create your own user-register.tpl.php (or whatever you want to call it). You will want to delete the page-user-register.tpl.php. Page templates are only for modifying the basic layout and arrangement of page elements. This page might help you understand the different template files that make up the individual parts of your nodes, blocks, pages, etc.
Here is a fantastic step by step for D6 registration form theming:
http://11heavens.com/theming-the-register-form-in-Drupal-6
Good luck!
do you know where i could go
do you know where i could go to figure out how to create this new function?
The article I linked to goes
The article I linked to goes through the whole process; from setting it up to creating the function. It's very thorough.
How to create new page.tpl.php in drupal 7
Hi Friends,
I have a doubt with how to create a new page.tpl.php ie: user--register.tpl.php, how the page can be configured with the template.tpl.php. What are the functions to be used to create a new page. Thanks in advance
by,
Use Devel themer
Use http://drupal.org/project/devel_themer