SitePoint Sponsor

User Tag List

Results 1 to 2 of 2

Thread: prefill field

  1. #1
    SitePoint Addict brain's Avatar
    Join Date
    Sep 2001
    Location
    Amsterdam
    Posts
    249
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    prefill field

    I have two fields in a form. The first is the email field the second is the username.
    Now I want the username field to be filled automatically with the part before "@" of the first field.
    So if someone fills in "brain@domain.com" the second field has to be filled with "brain" automatically.

    Tnx for any help with that

  2. #2
    Shiver me timbers!! anthony_irl's Avatar
    Join Date
    Aug 1999
    Location
    Dublin, Ireland
    Posts
    495
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hmm. Havent heard of that being able to be done in PHP without a page reload. The best option may be to use Javascript although I'm not sure of the exact code.
    Anthony - How's tings?

    24 hours in a day, 24 beers in a case. Coincidence? I think not.
    Contact me by: PM Email NEW! Carrier Pigeon


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •