Dynamic DataBinding in Form
am 30.04.2006 16:17:32 von Jonathan Gravois
I have an INSERT form with several fields two of which are FName and LName.
There is also a field named CUSTOMER which is the concatenation of those two
fields separated by a space. Is there a way to fill in customer as the user
types in the other two fields. I used to do this in Coldfusion; can I do it
with PHP?
Thanks,
Jon
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Re: Dynamic DataBinding in Form
am 30.04.2006 18:48:48 von Micah Stevens
Not quite sure what you're asking, but I think you mean, you want to
automatically fill customer with the concat'd values of FName and LName..
You can do this with PHP, but only once the form is submitted (remember,
PHP is server side) if you want to do it in the browser in front of the
user, you'll need some Javascript.. which is a bit off topic for this list.
The general idea though would be to set an onChange handler for the
FName and LName fields, and when it's triggered just update the other value:
document.getElementById('CUSTOMER').value =
document.getElementById('FName').value + ' ' +
document.getElementById('LName').value;
or something like that.
-Micah
JONATHAN GRAVOIS wrote:
> I have an INSERT form with several fields two of which are FName and LName.
> There is also a field named CUSTOMER which is the concatenation of those two
> fields separated by a space. Is there a way to fill in customer as the user
> types in the other two fields. I used to do this in Coldfusion; can I do it
> with PHP?
>
> Thanks,
> Jon
>
>
!DSPAM:4454ea70151712219219257!
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php