It's easy enough to do in CF8 Ajax, but, the point of 'dont autofill
if the user has changed the field' may be a bit difficult. How do you
know when the user has modified the field versus when the script has
modified it? I guess you could write code to say "As soon as I get a
key event, no long auto-update". Let me try to whip something up in
jQuery.
Ignoring that rule, here is a simple example in CF8:
<cfform name="form01">
first name <cfinput type="text" name="first_name"><br/>
last name <cfinput type="text" name="last_name"><br/>
profile name <cfinput type="text" name="profile_name"
bind="{first_name}{last_name}"><br/>
</cfform>
On Sun, May 31, 2009 at 4:24 PM, Rick Jensen <[email protected]> wrote:
>
> Summary: I am trying to autofill an input field based on the values of two
> other fields.
>
> Detail: I have two input fields called First_name and Last_name. I have a
> third field called Profile_name. I want to fill in the Profile_name to equal
> the value of the first two fields automatically when you lose focus on each
> of First_name and Last_name field.
>
> The new value of the Profile_name is a suggestion and the user may choose to
> overwrite it. If they go back and update the First_name and Last_name fields
> after the fact, I don't want to update the Profile_name field again.
>
> Any suggestions?
>
>
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Want to reach the ColdFusion community with something they want? Let them know
on the House of Fusion mailing lists
Archive:
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:323013
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4