NameSilo

Auto fill form fields

Namecheap AuctionsNamecheap Auctions
Namecheap AuctionsNamecheap Auctions
SpaceshipSpaceship
Watch

woody22

New Member
Impact
0
hi,

ive got an online system which allows people to enter info into a database about an absence request they have - at the same time this emails the person in charge of absences.

The form is setup now but to make it easier i want to alter the "Name" and "email" fields so they require no filling in ie - a staff members name will be chosen from a drop down list (ive done this bit fine) and then once this is done the relevant email for this person is automatically placed in the email field. This bit i am struggling with - anyone any ideas how this can be done??

Thanks!

Woody

PS: ive done this system using asp pages

:)
 
0
Close
The views expressed on this page by users and staff are their own, not those of NamePros.
GoDaddyGoDaddy
looks like you will need to use javascript for this because if you use php you will have to query the database again just to pull the email address.

not being a javascript expert I cant give you a complete answer but having had a quick look through a javascript book I have it looks like you should retrieve the email and name from the database and put it into a javascript array and then use the onchange javascript event to change the email address in the form field.
 
0
Close
DomainEasy: white label portfolios are live. Enable yours.

We're social

Escrow.com
Spaceship
Domain Recover
CryptoExchange.com

NamePros updates

Spatial Sidebar: More consistent display
We fixed some bugs in the Spatial Sidebar. It now displays more consistently across browsers and should perform better. If you use it...
AIVikings
Catchy
  • The sidebar remains visible by scrolling at a speed relative to the page’s height.
Back