Skip to main content
Inspiring
September 8, 2009
Question

checking if username exists in real-time for account sign up

  • September 8, 2009
  • 2 replies
  • 3938 views

Does anybody know where I might find some code that would easily integrate with CF7/SQL that would allow me to do a real-time check on a user name without the user having to submit the form?

I did a little research and AJAX appeared to be suggested, but I could not find any example code that I could use in CF.

This is a for an account sign up form where the user enters a username, I want a "Check Availabilty" button that they can hit which queries our SQL dbase to see if the username is taken or not

Thanks

Mark

This topic has been closed for replies.

2 replies

Inspiring
September 8, 2009

Another approach is to provide another button for checking the availabilty.  Then you can do the work in and iframe or pop up.

ACS LLCAuthor
Inspiring
September 8, 2009

check avail button is how I was hoping to make it function

Inspiring
September 8, 2009

Make it part of a different form.  Use javascript to pick up the string from the first form and put it in a hidden field.  Then submit to an iframe.

ilssac
Inspiring
September 8, 2009

Ajax is the ONLY way to do this without a full form submit request, page refresh response in the browser.

Unless you would like to replace the HTTP request/response browser application with something like Flash/Flex/Air user interface or similar technology.

But the normal way to do what you would like to do is to use AJAX which is not as complex as many make it sound.  With CF7 there are several comunity grown AJAX frame works, CFAJAX http://www.indiankey.com/cfajax/ and ajaxCFC http://ajaxcfc.riaforge.org/ are two of the best known.

Or you can simply role your own using the xmlhttprequest javascript object http://www.w3schools.com/dom/dom_http.asp and simple DHTML javascript to modify the DOM document object model.

ACS LLCAuthor
Inspiring
September 8, 2009

Hi Ian

That's what I was afraid of ;-)

I'll take a look around those links thats you sent to me, but it looks like this might be a little too complex if I can't find something off the shelf that I can more or less cut and paste... version 2.0 ;-)

Thanks

Mark