Welcome to WebmasterWorld Guest from 54.205.20.160

Forum Moderators: brotherhood of lan & mack

Message Too Old, No Replies

Registration Page issues

   
5:59 pm on Apr 16, 2009 (gmt 0)

5+ Year Member



I'm building a website that requires users to register to make full use of the available resources. It's a pretty in-depth registration, so I'm splitting it up to multiple pages. I've got the first page done, and I've got a button at the bottom that gives feedback if the registration fails for whatever reason.

My question is this: Is there a way to make that same button just go straight to the next page if there are no errors?

6:14 pm on Apr 16, 2009 (gmt 0)

WebmasterWorld Administrator lifeinasia is a WebmasterWorld Top Contributor of All Time 5+ Year Member Top Contributors Of The Month



Just put in some logic before the <form> tag. If no errors, then use <form action="next page">; otherwise, use <form action="this page">.

It's a pretty in-depth registration

We've found that the more complicated/involved you make things for people to register, the fewer people will actually register. It all depends on your particular situation, but which is more important to you- a registered user or all the extra information? (In other words, would you rather have more registrations or fewer registrations with more information for each registration?)

Best practice for us (and others) is put all the information that you absolutely MUST have (and pare that down to a minimum) on the first page. After the first page has been successfully submitted, get the other (option) information.

8:30 pm on Apr 18, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



LifeInAsia is spot-on that you should think long and hard before requiring an in-depth registration. Not that you shouldn't do it, but make sure you're willing to live with the low signup rate.

Anyway, to answer your question, yes, your button can both validate and submit. The general form is this:

<form action=script.pl method=post name=myform onsubmit="return validate()">
...
<script type=text/javascript>
function validate() {
if (testPassed) {return true}
else { return false;}
}

Finally, let me suggest that you use more descriptive subject titles when posting here. "Registration Page issues" doesn't give one much of a clue as to what your problem unless they open the page. I suggest putting as much of your question as you can into the two subject lines provided.

Hope this helps.

2:43 am on Apr 19, 2009 (gmt 0)

5+ Year Member



Server side coding + session variables would do the trick for you, depending on Javascript alone would be problematic.
7:19 pm on Apr 22, 2009 (gmt 0)

5+ Year Member



Thanks much for the help. And I'll try to make my topic names more descriptive in the future.